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) {
20 ; OBJ-NEXT: - Module: env
21 ; OBJ-NEXT: Field: __linear_memory
22 ; OBJ-NEXT: Kind: MEMORY
24 ; OBJ-NEXT: Minimum: 0x0
25 ; OBJ-NEXT: - Module: env
26 ; OBJ-NEXT: Field: __indirect_function_table
27 ; OBJ-NEXT: Kind: TABLE