1 ; RUN: opt < %s -prune-eh -S | FileCheck %s 2 ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s 3 4 ; CHECK-LABEL: define internal i32 @foo() 5 define internal i32 @foo() personality i32 (...)* @__gxx_personality_v0 { 6 ; CHECK-NOT: invoke i32 @foo() 7 invoke i32 @foo( ) 8 to label %Normal unwind label %Except ; <i32>:1 [#uses=0] 9 Normal: ; preds = %0 10 ret i32 12 11 Except: ; preds = %0 12 landingpad { i8*, i32 } 13 catch i8* null 14 ret i32 123 15 } 16 17 ; CHECK-LABEL: define i32 @caller() 18 define i32 @caller() personality i32 (...)* @__gxx_personality_v0 { 19 ; CHECK-NOT: invoke i32 @foo() 20 invoke i32 @foo( ) 21 to label %Normal unwind label %Except ; <i32>:1 [#uses=0] 22 Normal: ; preds = %0 23 ret i32 0 24 Except: ; preds = %0 25 landingpad { i8*, i32 } 26 catch i8* null 27 ret i32 1 28 } 29 30 declare i32 @__gxx_personality_v0(...) 31