diff options
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/post-emscripten.wast | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/lit/passes/post-emscripten.wast b/test/lit/passes/post-emscripten.wast new file mode 100644 index 000000000..259a16729 --- /dev/null +++ b/test/lit/passes/post-emscripten.wast @@ -0,0 +1,28 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. +;; RUN: wasm-opt %s --post-emscripten -S -o - | filecheck %s + +;; Checks that the start/stop exports are removed and that the data they +;; refer to is either zero'd out, or the segment emptied. + +(module + ;; CHECK: (global $g1 i32 (i32.const 1000)) + (global $g1 i32 (i32.const 1000)) + ;; CHECK: (global $g2 i32 (i32.const 1011)) + (global $g2 i32 (i32.const 1011)) + ;; CHECK: (global $g3 i32 (i32.const 2006)) + (global $g3 i32 (i32.const 2006)) + ;; CHECK: (global $g4 i32 (i32.const 2015)) + (global $g4 i32 (i32.const 2015)) + (memory 10 10) + ;; CHECK: (memory $0 10 10) + + ;; CHECK: (data $data1 (i32.const 1000) "") + (data $data1 (i32.const 1000) "hello world") + ;; CHECK: (data $data2 (i32.const 2000) "hello \00\00\00\00\00\00\00\00\00 world") + (data $data2 (i32.const 2000) "hello DELETE ME world") + (export "__start_em_asm" (global $g1)) + (export "__stop_em_asm" (global $g2)) + (export "__start_em_js" (global $g3)) + (export "__stop_em_js" (global $g4)) +) + |