diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2015-04-23 00:20:44 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2015-04-23 00:20:44 +0000 |
commit | 43e1d7627897c1efb45a61477f92b4298db7015b (patch) | |
tree | c8661cbba58574de2c9a58aeea06fc7d122ca80c /llvm/lib/CodeGen | |
parent | 7d4bc9c0fb925df6dc812969cb9aa7aa2ec2fd35 (diff) | |
download | bcm5719-llvm-43e1d7627897c1efb45a61477f92b4298db7015b.tar.gz bcm5719-llvm-43e1d7627897c1efb45a61477f92b4298db7015b.zip |
[WinEH] Don't skip landing pads that end with an unreachable instruction.
llvm-svn: 235563
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 67f7cdc8faf..e11da29fedc 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -637,12 +637,6 @@ bool WinEHPrepare::prepareExceptionHandlers( LPadHasActionList = true; break; } - // FIXME: This is here to help with the development of nested landing pad - // outlining. It should be removed when that is finished. - if (isa<UnreachableInst>(Inst)) { - LPadHasActionList = true; - break; - } } // If we've already outlined the handlers for this landingpad, @@ -1011,6 +1005,10 @@ static BasicBlock *createStubLandingPad(Function *Handler, llvm::StructType::get(Type::getInt8PtrTy(Context), Type::getInt32Ty(Context), nullptr), PersonalityFn, 0); + // Insert a call to llvm.eh.actions so that we don't try to outline this lpad. + Function *ActionIntrin = Intrinsic::getDeclaration(Handler->getParent(), + Intrinsic::eh_actions); + Builder.CreateCall(ActionIntrin, "recover"); LPad->setCleanup(true); Builder.CreateUnreachable(); return StubBB; |