| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | |
| ;; RUN: wasm-merge %s first %s.second second -all -S -o - | filecheck %s | |
| ;; Test that we handle code annotations properly. Both the first and second | |
| ;; wasm files have annotations that should be preserved. | |
| (module | |
| ;; CHECK: (type $0 (func)) | |
| ;; CHECK: (export "first" (func $first)) | |
| ;; CHECK: (export "second" (func $second)) | |
| ;; CHECK: (@binaryen.js.called) | |
| ;; CHECK-NEXT: (func $first (type $0) | |
| ;; CHECK-NEXT: (@metadata.code.branch_hint "\00") | |
| ;; CHECK-NEXT: (if | |
| ;; CHECK-NEXT: (i32.const 0) | |
| ;; CHECK-NEXT: (then | |
| ;; CHECK-NEXT: (return) | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK-NEXT: ) | |
| (@binaryen.js.called) | |
| (func $first (export "first") | |
| (@metadata.code.branch_hint "\00") | |
| (if | |
| (i32.const 0) | |
| (then | |
| (return) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ;; CHECK: (@binaryen.js.called) | |
| ;; CHECK-NEXT: (func $second (type $0) | |
| ;; CHECK-NEXT: (@metadata.code.branch_hint "\01") | |
| ;; CHECK-NEXT: (if | |
| ;; CHECK-NEXT: (i32.const 0) | |
| ;; CHECK-NEXT: (then | |
| ;; CHECK-NEXT: (return) | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK-NEXT: ) |