diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-06-17 20:52:32 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-06-17 20:52:32 +0000 |
| commit | 7fddeccb8b4694002e3a2130d4bce07d628b1db2 (patch) | |
| tree | 01bc06f3a0d026c80340d658807481ae33240033 /llvm/test/Feature | |
| parent | f32991461f301bbc99c17cc51fd44a50d2012179 (diff) | |
| download | bcm5719-llvm-7fddeccb8b4694002e3a2130d4bce07d628b1db2.tar.gz bcm5719-llvm-7fddeccb8b4694002e3a2130d4bce07d628b1db2.zip | |
Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.
This isn't desirable because:
- All LandingPadInsts in the same function must have the same
personality routine. This means that each LandingPadInst beyond the
first has an operand which produces no additional information.
- There is ongoing work to introduce EH IR constructs other than
LandingPadInst. Moving the personality routine off of any one
particular Instruction and onto the parent function seems a lot better
than have N different places a personality function can sneak onto an
exceptional function.
Differential Revision: http://reviews.llvm.org/D10429
llvm-svn: 239940
Diffstat (limited to 'llvm/test/Feature')
| -rw-r--r-- | llvm/test/Feature/callingconventions.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Feature/calltest.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Feature/exception.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Feature/seh-nounwind.ll | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/llvm/test/Feature/callingconventions.ll b/llvm/test/Feature/callingconventions.ll index 8b339d43fcd..9aafb36c757 100644 --- a/llvm/test/Feature/callingconventions.ll +++ b/llvm/test/Feature/callingconventions.ll @@ -25,7 +25,7 @@ define coldcc void @bar2() { ret void } -define cc42 void @bar3() { +define cc42 void @bar3() personality i32 (...)* @__gxx_personality_v0 { invoke fastcc void @foo( ) to label %Ok unwind label %U @@ -33,12 +33,12 @@ Ok: ret void U: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } -define void @bar4() { +define void @bar4() personality i32 (...)* @__gxx_personality_v0 { call cc42 void @bar( ) invoke cc42 void @bar3( ) to label %Ok unwind label %U @@ -47,7 +47,7 @@ Ok: ret void U: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup resume { i8*, i32 } %exn } diff --git a/llvm/test/Feature/calltest.ll b/llvm/test/Feature/calltest.ll index e7d8e8d00b3..a53c3a1215a 100644 --- a/llvm/test/Feature/calltest.ll +++ b/llvm/test/Feature/calltest.ll @@ -10,7 +10,7 @@ define void @invoke(%FunTy* %x) { ret void } -define i32 @main(i32 %argc) { +define i32 @main(i32 %argc) personality i32 (...)* @__gxx_personality_v0 { %retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2] %two = add i32 %retval, %retval ; <i32> [#uses=1] %retval2 = invoke i32 @test( i32 %argc ) @@ -22,7 +22,7 @@ Next: ret i32 %two2 Error: - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup ret i32 -1 } diff --git a/llvm/test/Feature/exception.ll b/llvm/test/Feature/exception.ll index 6e18a81bcfc..7568ecfa5f7 100644 --- a/llvm/test/Feature/exception.ll +++ b/llvm/test/Feature/exception.ll @@ -6,7 +6,7 @@ @_ZTId = external constant i8* @_ZTIPKc = external constant i8* -define void @_Z3barv() uwtable optsize ssp { +define void @_Z3barv() uwtable optsize ssp personality i32 (...)* @__gxx_personality_v0 { entry: invoke void @_Z3quxv() optsize to label %try.cont unwind label %lpad @@ -15,7 +15,7 @@ try.cont: ; preds = %entry, %invoke.cont ret void lpad: ; preds = %entry - %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + %exn = landingpad {i8*, i32} cleanup catch i8** @_ZTIc filter [2 x i8**] [i8** @_ZTIPKc, i8** @_ZTId] diff --git a/llvm/test/Feature/seh-nounwind.ll b/llvm/test/Feature/seh-nounwind.ll index 203471649df..2afd1004647 100644 --- a/llvm/test/Feature/seh-nounwind.ll +++ b/llvm/test/Feature/seh-nounwind.ll @@ -11,13 +11,13 @@ entry: ret i32 %div } -define i32 @main() nounwind { +define i32 @main() nounwind personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) { entry: %call = invoke i32 @div(i32 10, i32 0) to label %__try.cont unwind label %lpad lpad: - %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) + %0 = landingpad { i8*, i32 } catch i8* null br label %__try.cont |

