summaryrefslogtreecommitdiff
path: root/test/lit/passes/post-emscripten.wast
blob: 259a16729ad550aa1b8e44e1b7f73f87321cd18c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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))
)