summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-30 22:58:10 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-30 22:58:10 +0000
commitcde33036ed74db02088f5e3558afa33384cc4a13 (patch)
treee9f3517e12e60cb09d52aed542ba40869d8ba68b /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent5fe5ef9e0ecc888d17f30ff6e1b977a0ebce7fa3 (diff)
downloadbcm5719-llvm-cde33036ed74db02088f5e3558afa33384cc4a13.tar.gz
bcm5719-llvm-cde33036ed74db02088f5e3558afa33384cc4a13.zip
[WinEH] Run cleanup handlers when an exception is thrown
Generate tables in the .xdata section representing what actions to take when an exception is thrown. This currently fills in state for cleanups, catch handlers are still unfinished. llvm-svn: 233636
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 17950058bb2..3de9c26a905 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -33,6 +33,7 @@
#include "llvm/CodeGen/SchedulerRegistry.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
+#include "llvm/CodeGen/WinEHFuncInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Function.h"
@@ -988,6 +989,10 @@ void SelectionDAGISel::PrepareEHLandingPad() {
FuncInfo->InsertPt = MBB->end();
return;
}
+ if (MF->getMMI().getPersonalityType() == EHPersonality::MSVC_CXX) {
+ WinEHFuncInfo &FuncInfo = MF->getMMI().getWinEHFuncInfo(MF->getFunction());
+ MF->getMMI().addWinEHState(MBB, FuncInfo.LandingPadStateMap[LPadInst]);
+ }
// Mark exception register as live in.
if (unsigned Reg = TLI->getExceptionPointerRegister())
OpenPOWER on IntegriCloud