• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -prune-eh -S | FileCheck %s
2; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
3
4declare void @nounwind() nounwind
5
6define internal void @foo() {
7	call void @nounwind()
8	ret void
9}
10
11; CHECK-LABEL: define i32 @caller()
12define 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
17Normal:		; preds = %0
18	ret i32 0
19
20Except:		; preds = %0
21        landingpad { i8*, i32 }
22                catch i8* null
23	ret i32 1
24}
25
26declare i32 @__gxx_personality_v0(...)
27