1; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
2; RUN: llc -filetype=obj %s -o %t.main.o
3; RUN: wasm-ld --export=ret32 -o %t.wasm %t.main.o %t.ret32.o
4; RUN: obj2yaml %t.wasm | FileCheck %s
5
6target triple = "wasm32-unknown-unknown"
7
8declare i32 @ret32(i32)
9
10define void @_start() {
11entry:
12  %call1 = call i32 @ret32(i32 0)
13  ret void
14}
15
16; CHECK:        - Type:            EXPORT
17; CHECK:            - Name:            ret32
18; CHECK-NEXT:         Kind:            FUNCTION
19; CHECK-NEXT:         Index:           2
20
21; CHECK:        - Type:            CUSTOM
22; CHECK-NEXT:     Name:            name
23; CHECK-NEXT:     FunctionNames:
24; CHECK-NEXT:       - Index:           0
25; CHECK-NEXT:         Name:            'signature_mismatch:ret32'
26; CHECK-NEXT:       - Index:           1
27; CHECK-NEXT:         Name:            _start
28; CHECK-NEXT:       - Index:           2
29; CHECK-NEXT:         Name:            ret32
30; CHECK-NEXT:     GlobalNames:
31; CHECK-NEXT:       - Index:           0
32; CHECK-NEXT:         Name:            __stack_pointer
33; CHECK-NEXT: ...
34