xref: /llvm-project/lld/test/wasm/function-index.test (revision fd1c894a4a3690b2e500bfdf71194e9cc3f1b399)
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 %p/Inputs/ret64.s -o %t.ret64.o
3# RUN: wasm-ld -r -o %t.wasm %t.ret32.o %t.ret64.o
4# RUN: obj2yaml %t.wasm | FileCheck %s
5
6CHECK: Sections:
7CHECK:   - Type:            TYPE
8CHECK:     Signatures:
9CHECK:       - Index:           0
10CHECK:         ParamTypes:
11CHECK:           - F32
12CHECK:         ReturnTypes:
13CHECK:           - I32
14CHECK:       - Index:           1
15CHECK:         ParamTypes:
16CHECK:           - F64
17CHECK:         ReturnTypes:
18CHECK:           - I64
19CHECK: - Type:            FUNCTION
20CHECK:   FunctionTypes: [ 0, 1 ]
21