1 ; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s
5 ; CHECK: The unwind destination does not have an exception handling instruction
6 %A = invoke i32 @foo( )
7 to label %L unwind label %L ; <i32> [#uses=1]
14 br i1 false, label %L1, label %L2
16 %A = invoke i32 @bar( )
17 to label %L unwind label %L ; <i32> [#uses=1]
20 L: ; preds = %L2, %L1, %L1
21 ; CHECK: The unwind destination does not have an exception handling instruction
26 declare i32 @__gxx_personality_v0(...)
27 declare void @llvm.donothing()
28 declare void @llvm.trap()
29 declare i8 @llvm.expect.i8(i8,i8)
32 define void @f1() personality ptr @__gxx_personality_v0 {
35 invoke void @llvm.donothing()
36 to label %conta unwind label %contb
42 %0 = landingpad { ptr, i32 }
43 filter [0 x ptr] zeroinitializer
47 define i8 @f2() personality ptr @__gxx_personality_v0 {
49 ; CHECK: Cannot invoke an intrinsic other than donothing, patchpoint, statepoint, coro_resume, coro_destroy or clang.arc.attachedcall
50 invoke void @llvm.trap()
51 to label %cont unwind label %lpad
57 %0 = landingpad { ptr, i32 }
58 filter [0 x ptr] zeroinitializer
64 ; CHECK: Cannot take the address of an intrinsic
65 %call = call i32 @fn(ptr @llvm.expect.i8)
69 define void @f4() personality ptr @__gxx_personality_v0 {
71 invoke void @llvm.donothing()
72 to label %cont unwind label %cont
75 ; CHECK: Block containing LandingPadInst must be jumped to only by the unwind edge of an invoke.
76 %0 = landingpad { ptr, i32 }
77 filter [0 x ptr] zeroinitializer