r245798 - [WinEH] Update to new EH pad/ret signatures (with tokens required)
Joseph Tremoulet via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 22 17:26:48 PDT 2015
Author: josepht
Date: Sat Aug 22 19:26:48 2015
New Revision: 245798
URL: http://llvm.org/viewvc/llvm-project?rev=245798&view=rev
Log:
[WinEH] Update to new EH pad/ret signatures (with tokens required)
Summary:
The signatures of the methods in LLVM for creating EH pads/rets are changing
to require token arguments on rets and assume token return type on pads.
Update creation code accordingly.
Reviewers: majnemer, rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12109
Modified:
cfe/trunk/lib/CodeGen/CGCleanup.cpp
cfe/trunk/lib/CodeGen/CGException.cpp
cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
Modified: cfe/trunk/lib/CodeGen/CGCleanup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCleanup.cpp?rev=245798&r1=245797&r2=245798&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCleanup.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCleanup.cpp Sat Aug 22 19:26:48 2015
@@ -904,8 +904,7 @@ void CodeGenFunction::PopCleanupBlock(bo
llvm::BasicBlock *NextAction = getEHDispatchBlock(EHParent);
if (CGM.getCodeGenOpts().NewMSEH &&
EHPersonality::get(*this).isMSVCPersonality())
- CPI = Builder.CreateCleanupPad(llvm::Type::getTokenTy(getLLVMContext()),
- {});
+ CPI = Builder.CreateCleanupPad({});
// We only actually emit the cleanup code if the cleanup is either
// active or was used before it was deactivated.
@@ -916,7 +915,7 @@ void CodeGenFunction::PopCleanupBlock(bo
}
if (CPI)
- Builder.CreateCleanupRet(NextAction, CPI);
+ Builder.CreateCleanupRet(CPI, NextAction);
else
Builder.CreateBr(NextAction);
Modified: cfe/trunk/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=245798&r1=245797&r2=245798&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Sat Aug 22 19:26:48 2015
@@ -887,11 +887,10 @@ static llvm::BasicBlock *emitMSVCCatchDi
if (EHPersonality::get(CGF).isMSVCXXPersonality()) {
CGF.Builder.CreateCatchPad(
- llvm::Type::getTokenTy(CGF.getLLVMContext()), Handler.Block,
- NextBlock, {TypeValue, llvm::Constant::getNullValue(CGF.VoidPtrTy)});
+ Handler.Block, NextBlock,
+ {TypeValue, llvm::Constant::getNullValue(CGF.VoidPtrTy)});
} else {
- CGF.Builder.CreateCatchPad(llvm::Type::getTokenTy(CGF.getLLVMContext()),
- Handler.Block, NextBlock, {TypeValue});
+ CGF.Builder.CreateCatchPad(Handler.Block, NextBlock, {TypeValue});
}
// Otherwise we need to emit and continue at that block.
Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=245798&r1=245797&r2=245798&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Sat Aug 22 19:26:48 2015
@@ -859,7 +859,7 @@ struct CallEndCatchMSVC final : EHScopeS
void Emit(CodeGenFunction &CGF, Flags flags) override {
if (CGF.CGM.getCodeGenOpts().NewMSEH) {
llvm::BasicBlock *BB = CGF.createBasicBlock("catchret.dest");
- CGF.Builder.CreateCatchRet(BB, CPI);
+ CGF.Builder.CreateCatchRet(CPI, BB);
CGF.EmitBlock(BB);
} else {
CGF.EmitNounwindRuntimeCall(
More information about the cfe-commits
mailing list