Home | History | Annotate | Download | only in PruneEH
      1 ; RUN: opt < %s -prune-eh -S | FileCheck %s
      2 ; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
      3 
      4 declare void @nounwind() nounwind
      5 
      6 define internal void @foo() {
      7 	call void @nounwind()
      8 	ret void
      9 }
     10 
     11 ; CHECK-LABEL: define i32 @caller()
     12 define i32 @caller() personality i32 (...)* @__gxx_personality_v0 {
     13 ; CHECK-NOT: invoke void @foo
     14 	invoke void @foo( )
     15 			to label %Normal unwind label %Except
     16 
     17 Normal:		; preds = %0
     18 	ret i32 0
     19 
     20 Except:		; preds = %0
     21         landingpad { i8*, i32 }
     22                 catch i8* null
     23 	ret i32 1
     24 }
     25 
     26 declare i32 @__gxx_personality_v0(...)
     27