Move the personality function from LandingPadInst to Function
[oota-llvm.git] / test / Transforms / LowerInvoke / 2003-12-10-Crash.ll
1 ; This testcase was reduced from Shootout-C++/reversefile.cpp by bugpoint
2
3 ; RUN: opt < %s -lowerinvoke -disable-output
4
5 declare void @baz()
6
7 declare void @bar()
8
9 define void @foo() personality i32 (...)* @__gxx_personality_v0 {
10 then:
11         invoke void @baz( )
12                         to label %invoke_cont.0 unwind label %try_catch
13 invoke_cont.0:          ; preds = %then
14         invoke void @bar( )
15                         to label %try_exit unwind label %try_catch
16 try_catch:              ; preds = %invoke_cont.0, %then
17         %__tmp.0 = phi i32* [ null, %invoke_cont.0 ], [ null, %then ]           ; <i32*> [#uses=0]
18   %res = landingpad { i8* }
19           cleanup
20         ret void
21 try_exit:               ; preds = %invoke_cont.0
22         ret void
23 }
24
25 declare i32 @__gxx_personality_v0(...)