[PATCH] D12109: [WinEH] Update to new EH pad/ret signatures (with tokens required)
Joseph Tremoulet via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 21 08:41:59 PDT 2015
JosephTremoulet updated this revision to Diff 32831.
JosephTremoulet added a comment.
rebase
http://reviews.llvm.org/D12109
Files:
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGException.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
Index: lib/CodeGen/MicrosoftCXXABI.cpp
===================================================================
--- lib/CodeGen/MicrosoftCXXABI.cpp
+++ lib/CodeGen/MicrosoftCXXABI.cpp
@@ -859,7 +859,7 @@
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(
Index: lib/CodeGen/CGException.cpp
===================================================================
--- lib/CodeGen/CGException.cpp
+++ lib/CodeGen/CGException.cpp
@@ -887,11 +887,10 @@
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.
Index: lib/CodeGen/CGCleanup.cpp
===================================================================
--- lib/CodeGen/CGCleanup.cpp
+++ lib/CodeGen/CGCleanup.cpp
@@ -904,8 +904,7 @@
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 @@
}
if (CPI)
- Builder.CreateCleanupRet(NextAction, CPI);
+ Builder.CreateCleanupRet(CPI, NextAction);
else
Builder.CreateBr(NextAction);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12109.32831.patch
Type: text/x-patch
Size: 2223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150821/9699eaef/attachment.bin>
More information about the cfe-commits
mailing list