Index: test/wasm/call-indirect.ll =================================================================== --- test/wasm/call-indirect.ll +++ test/wasm/call-indirect.ll @@ -13,15 +13,15 @@ ; Function Attrs: norecurse nounwind readnone define i32 @foo() #0 { entry: - ret i32 1 + ret i32 2 } ; Function Attrs: nounwind -define void @_start() local_unnamed_addr #1 { +define i32 @_start() local_unnamed_addr #1 { entry: %0 = load i32 ()*, i32 ()** @indirect_func, align 4 %call = tail call i32 %0() #2 - ret void + ret i32 0 } ; CHECK: !WASM @@ -37,7 +37,7 @@ ; CHECK-NEXT: ReturnType: NORESULT ; CHECK-NEXT: ParamTypes: ; CHECK-NEXT: - Type: FUNCTION -; CHECK-NEXT: FunctionTypes: [ 0, 1, 0, 1 ] +; CHECK-NEXT: FunctionTypes: [ 0, 1, 0, 0 ] ; CHECK-NEXT: - Type: TABLE ; CHECK-NEXT: Tables: ; CHECK-NEXT: - ElemType: ANYFUNC @@ -72,7 +72,7 @@ ; CHECK-NEXT: - Name: call_bar_indirect ; CHECK-NEXT: Kind: FUNCTION ; CHECK-NEXT: Index: 1 -; CHECK: - Type: ELEM +; CHECK-NEXT: - Type: ELEM ; CHECK-NEXT: Segments: ; CHECK-NEXT: - Offset: ; CHECK-NEXT: Opcode: I32_CONST @@ -80,10 +80,15 @@ ; CHECK-NEXT: Functions: [ 0, 2 ] ; CHECK-NEXT: - Type: CODE ; CHECK-NEXT: Functions: -; CHECK: - Locals: -; CHECK: - Locals: -; CHECK: - Locals: -; CHECK: - Type: DATA +; CHECK-NEXT: - Locals: +; CHECK-NEXT: Body: 41010B +; CHECK-NEXT: - Locals: +; CHECK-NEXT: Body: 410028028088808000118080808000001A0B +; CHECK-NEXT: - Locals: +; CHECK-NEXT: Body: 41020B +; CHECK-NEXT: - Locals: +; CHECK-NEXT: Body: 410028028888808000118080808000001A41000B +; CHECK-NEXT: - Type: DATA ; CHECK-NEXT: Segments: ; CHECK-NEXT: - SectionOffset: 7 ; CHECK-NEXT: MemoryIndex: 0