27 lines · plain
1; RUN: not --crash llc < %s -wasm-enable-eh -exception-model=wasm -mattr=+exception-handling 2>&1 | FileCheck %s2 3target triple = "wasm32-unknown-unknown"4 5; Tests if the compiler correctly errors out when a function having EH pads does6; not have a correct Wasm personality function.7 8define void @test() personality ptr @invalid_personality {9; CHECK: LLVM ERROR: Function 'test' does not have a correct Wasm personality function '__gxx_wasm_personality_v0'10entry:11 invoke void @foo()12 to label %try.cont unwind label %catch.dispatch13 14catch.dispatch: ; preds = %entry15 %0 = catchswitch within none [label %catch.start] unwind to caller16 17catch.start: ; preds = %catch.dispatch18 %1 = catchpad within %0 [ptr null]19 catchret from %1 to label %try.cont20 21try.cont: ; preds = %catch, %entry22 ret void23}24 25declare void @foo()26declare i32 @invalid_personality(...)27