summaryrefslogtreecommitdiff
path: root/test/lit/passes/separate-data-segments.wast
blob: ad921df79b49bea0a4831712d56519de383b5b54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
;; RUN: wasm-opt %s --separate-data-segments=%t.data --pass-arg=separate-data-segments-global-base@1024 -S -o - | filecheck %s
;; RUN: cat %t.data | filecheck %s --check-prefix=CHECK-DATA

(module
  ;; CHECK:      (memory $0 1 1)
  (memory 1 1)

  ;; CHECK-NOT (data
  (data (i32.const 1024) "hello world\n")

  ;; CHECK:      (func $foo
  (func $foo
    (call $bar)
  )

  ;; CHECK:      (func $bar
  (func $bar
    (call $foo)
  )
)

;; CHECK-DATA: {{^}}hello world{{$}}