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/Transforms/CodeExtractor | |
| parent | f32991461f301bbc99c17cc51fd44a50d2012179 (diff) | |
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/Transforms/CodeExtractor')
| -rw-r--r-- | llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll b/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll index ff5de6b73e21..fd9814c545fc 100644 --- a/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll +++ b/llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll @@ -4,7 +4,7 @@ declare i32 @_IO_getc() declare void @__errno_location() -define void @yylex() { +define void @yylex() personality i32 (...)* @__gcc_personality_v0 { entry: switch i32 0, label %label.126 [ i32 0, label %return @@ -190,7 +190,7 @@ return: ; preds = %entry ret void LongJmpBlkPre: ; preds = %endif.52, %then.40 - %exn = landingpad { i8*, i32 } personality i32 (...)* @__gcc_personality_v0 + %exn = landingpad { i8*, i32 } catch i8* null ret void } diff --git a/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll b/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll index 92603d9e634e..0a83681a0717 100644 --- a/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll +++ b/llvm/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -extract-blocks -disable-output -define i32 @foo() { +define i32 @foo() personality i32 (...)* @__gcc_personality_v0 { br label %EB EB: ; preds = %0 @@ -10,7 +10,7 @@ Cont: ; preds = %EB ret i32 %V Unw: ; preds = %EB - %exn = landingpad { i8*, i32 } personality i32 (...)* @__gcc_personality_v0 + %exn = landingpad { i8*, i32 } catch i8* null resume { i8*, i32 } %exn } |
