| ;; 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 --rename-export-conflicts -all -S -o - | filecheck %s | |
| ;; Test that we merge start functions. The first module here has none, but the | |
| ;; second does, so we'll refer to its start function in the merged module. | |
| (module | |
| (func $start | |
| ;; This function has the name start, but is *not* the start function. The | |
| ;; other module's start will need to get a new deduplicated name. | |
| (drop | |
| (i32.const 0) | |
| ) | |
| ) | |
| ) | |
| ;; CHECK: (type $0 (func)) | |
| ;; CHECK: (export "start" (func $start_1)) | |
| ;; CHECK: (export "user" (func $user)) | |
| ;; CHECK: (start $start_1) | |
| ;; CHECK: (func $start_1 (type $0) | |
| ;; CHECK-NEXT: (drop | |
| ;; CHECK-NEXT: (i32.const 1) | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK-NEXT: ) | |
| ;; CHECK: (func $user (type $0) | |
| ;; CHECK-NEXT: (call $start_1) | |
| ;; CHECK-NEXT: (call $start_1) | |
| ;; CHECK-NEXT: ) |