| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. |
| |
| ;; RUN: foreach %s %t wasm-opt --remove-start -all -S -o - | filecheck %s |
| |
| ;; The start is removed, and we are not confused by similar names. |
| (module |
| (start $st) |
| |
| ;; CHECK: (type $0 (func)) |
| |
| ;; CHECK: (func $st (type $0) |
| ;; CHECK-NEXT: (drop |
| ;; CHECK-NEXT: (i32.const 10) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $st |
| (drop (i32.const 10)) |
| ) |
| |
| ;; CHECK: (func $start (type $0) |
| ;; CHECK-NEXT: (drop |
| ;; CHECK-NEXT: (i32.const 20) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $start |
| (drop (i32.const 20)) |
| ) |
| ) |
| |
| ;; We do nothing and do not error when there is no start. |
| (module |
| ;; CHECK: (type $0 (func)) |
| |
| ;; CHECK: (func $st (type $0) |
| ;; CHECK-NEXT: (drop |
| ;; CHECK-NEXT: (i32.const 10) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $st |
| (drop (i32.const 10)) |
| ) |
| |
| ;; CHECK: (func $start (type $0) |
| ;; CHECK-NEXT: (drop |
| ;; CHECK-NEXT: (i32.const 20) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $start |
| (drop (i32.const 20)) |
| ) |
| ) |
| |