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
4
5target triple = "wasm32-unknown-unknown"
6
7declare void @f0() #0
8
9define void @_start() {
10    call void @f0()
11    ret void
12}
13
14attributes #0 = { "wasm-import-module"="somewhere" "wasm-import-name"="something" }
15
16; CHECK:        - Type:            IMPORT
17; CHECK-NEXT:     Imports:
18; CHECK-NEXT:       - Module:          somewhere
19; CHECK-NEXT:         Field:           something
20; CHECK-NEXT:         Kind:            FUNCTION
21; CHECK-NEXT:         SigIndex:        0
22
23; CHECK:        - Type:            CUSTOM
24; CHECK-NEXT:     Name:            name
25; CHECK-NEXT:     FunctionNames:
26; CHECK-NEXT:       - Index:           0
27; CHECK-NEXT:         Name:            f0
28