Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / wasm / function-imports.s
blob825747849fff2955cf4e0451ac02bd8e4780b317
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
3 # RUN: wasm-ld -o %t.wasm %t.ret32.o %t.o
4 # RUN: obj2yaml %t.wasm | FileCheck %s
6 .functype ret32 (f32) -> (i32)
8 .globl _start
9 _start:
10 .functype _start () -> ()
11 f32.const 0.000000e+00
12 call ret32
13 drop
14 end_function
16 # CHECK: Sections:
17 # CHECK: - Type: TYPE
18 # CHECK-NEXT: Signatures:
19 # CHECK-NEXT: - Index: 0
20 # CHECK-NEXT: ParamTypes:
21 # CHECK-NEXT: - F32
22 # CHECK-NEXT: ReturnTypes:
23 # CHECK-NEXT: - I32
24 # CHECK-NEXT: - Index: 1
25 # CHECK-NEXT: ParamTypes:
26 # CHECK-NEXT: ReturnTypes: []
27 # CHECK-NEXT: - Type: FUNCTION
28 # CHECK-NEXT: FunctionTypes: [ 0, 1 ]
29 # CHECK: - Type: CODE
30 # CHECK-NEXT: Functions:
31 # CHECK: - Index: 0
32 # CHECK: - Index: 1
33 # CHECK: Name: name
34 # CHECK-NEXT: FunctionNames:
35 # CHECK-NEXT: - Index: 0
36 # CHECK-NEXT: Name: ret32
37 # CHECK-NEXT: - Index: 1
38 # CHECK-NEXT: Name: _start
39 # CHECK-NEXT: GlobalNames:
40 # CHECK-NEXT: - Index: 0
41 # CHECK-NEXT: Name: __stack_pointer
42 # CHECK-NEXT: ...