1 ; Test that if an invoked function is inlined, and if that function cannot
2 ; throw, that the dead handler is now unreachable.
4 ; RUN: opt < %s -inline -simplifycfg -S | \
5 ; RUN: not grep UnreachableExceptionHandler
7 declare void @might_throw()
9 define internal i32 @callee() {
10 invoke void @might_throw( )
11 to label %cont unwind label %exc
17 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
22 ; caller returns true if might_throw throws an exception... callee cannot throw.
23 define i32 @caller() {
24 %X = invoke i32 @callee( )
25 to label %cont unwind label %UnreachableExceptionHandler ; <i32> [#uses=1]
30 UnreachableExceptionHandler: ; preds = %0
31 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
36 declare i32 @__gxx_personality_v0(...)