1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
2 # RUN: wasm-ld --export-if-defined=foo -o %t1.wasm %t.o
3 # RUN: obj2yaml %t1.wasm | FileCheck %s
5 # RUN: wasm-ld --export-if-defined=bar -o %t2.wasm %t.o
6 # RUN: obj2yaml %t2.wasm | FileCheck %s --check-prefixes=MISSING
10 .functype foo () -> ()
15 .functype _start () -> ()
18 # CHECK: - Type: EXPORT
19 # CHECK-NEXT: Exports:
20 # CHECK-NEXT: - Name: memory
21 # CHECK-NEXT: Kind: MEMORY
22 # CHECK-NEXT: Index: 0
23 # CHECK-NEXT: - Name: foo
24 # CHECK-NEXT: Kind: FUNCTION
25 # CHECK-NEXT: Index: 0
26 # CHECK-NEXT: - Name: _start
27 # CHECK-NEXT: Kind: FUNCTION
28 # CHECK-NEXT: Index: 1
30 # MISSING: - Type: EXPORT
31 # MISSING-NEXT: Exports:
32 # MISSING-NEXT: - Name: memory
33 # MISSING-NEXT: Kind: MEMORY
34 # MISSING-NEXT: Index: 0
35 # MISSING-NEXT: - Name: _start
36 # MISSING-NEXT: Kind: FUNCTION
37 # MISSING-NEXT: Index: 0