1 ; RUN: llc -filetype=obj %s -o %t.o
2 ; RUN: wasm-ld -o %t.wasm %t.o
3 ; RUN: obj2yaml %t.wasm | FileCheck %s
5 target triple = "wasm32-unknown-unknown"
7 define void @foo() #0 {
11 define void @qux() #1 {
15 define void @_start() {
20 attributes #0 = { "wasm-export-name"="bar" }
22 attributes #1 = { "wasm-export-name"="" }
24 ; CHECK: - Type: EXPORT
25 ; CHECK-NEXT: Exports:
26 ; CHECK-NEXT: - Name: memory
27 ; CHECK-NEXT: Kind: MEMORY
28 ; CHECK-NEXT: Index: 0
29 ; CHECK-NEXT: - Name: bar
30 ; CHECK-NEXT: Kind: FUNCTION
31 ; CHECK-NEXT: Index: 0
32 ; CHECK-NEXT: - Name: ''
33 ; CHECK-NEXT: Kind: FUNCTION
34 ; CHECK-NEXT: Index: 1
35 ; CHECK-NEXT: - Name: _start
36 ; CHECK-NEXT: Kind: FUNCTION
37 ; CHECK-NEXT: Index: 2