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"
10 define void @_start() {
16 attributes #0 = { "wasm-import-module"="somewhere" "wasm-import-name"="something" }
17 attributes #1 = { "wasm-import-module"="otherwhere" "wasm-import-name"="" }
19 ; CHECK: - Type: IMPORT
20 ; CHECK-NEXT: Imports:
21 ; CHECK-NEXT: - Module: somewhere
22 ; CHECK-NEXT: Field: something
23 ; CHECK-NEXT: Kind: FUNCTION
24 ; CHECK-NEXT: SigIndex: 0
25 ; CHECK-NEXT: - Module: otherwhere
26 ; CHECK-NEXT: Field: ''
27 ; CHECK-NEXT: Kind: FUNCTION
28 ; CHECK-NEXT: SigIndex: 0
30 ; CHECK: - Type: CUSTOM
31 ; CHECK-NEXT: Name: name
32 ; CHECK-NEXT: FunctionNames:
33 ; CHECK-NEXT: - Index: 0
34 ; CHECK-NEXT: Name: f0
35 ; CHECK-NEXT: - Index: 1
36 ; CHECK-NEXT: Name: f1