[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / CodeGen / WebAssembly / call-indirect.ll
blob7a174318d4732835b81e05210735bc7190bf55a1
1 ; RUN: llc < %s -asm-verbose=false -O2 | FileCheck --check-prefix=CHECK %s
2 ; RUN: llc < %s -asm-verbose=false -O2 --filetype=obj | obj2yaml | FileCheck --check-prefix=OBJ %s
4 ; Test that compilation units with call_indirect but without any
5 ; function pointer declarations still get a table.
7 target triple = "wasm32-unknown-unknown"
9 ; CHECK-LABEL: call_indirect_void:
10 ; CHECK-NEXT: .functype call_indirect_void (i32) -> ()
11 ; CHECK-NEXT: local.get 0
12 ; CHECK-NEXT: call_indirect () -> ()
13 ; CHECK-NEXT: end_function
14 define void @call_indirect_void(void ()* %callee) {
15   call void %callee()
16   ret void
19 ; OBJ:    Imports:
20 ; OBJ-NEXT:      - Module:          env
21 ; OBJ-NEXT:        Field:           __linear_memory
22 ; OBJ-NEXT:        Kind:            MEMORY
23 ; OBJ-NEXT:        Memory:
24 ; OBJ-NEXT:          Minimum:         0x0
25 ; OBJ-NEXT:      - Module:          env
26 ; OBJ-NEXT:        Field:           __indirect_function_table
27 ; OBJ-NEXT:        Kind:            TABLE