diff options
author | Joseph Tremoulet <jotrem@microsoft.com> | 2015-10-07 17:16:25 +0000 |
---|---|---|
committer | Joseph Tremoulet <jotrem@microsoft.com> | 2015-10-07 17:16:25 +0000 |
commit | bde46c5642c859d3340d871cc41e7e5d31001b6f (patch) | |
tree | fea7d9236fa8eeffaf7b37f3edc430ad58c2b745 /llvm/lib/CodeGen/SelectionDAG | |
parent | b4908761f834b532dd9a1bb9e5e0dc5e1a62e29d (diff) | |
download | bcm5719-llvm-bde46c5642c859d3340d871cc41e7e5d31001b6f.tar.gz bcm5719-llvm-bde46c5642c859d3340d871cc41e7e5d31001b6f.zip |
[WinEH] Update CoreCLR EH for catchpad MBBs
Summary:
Set the pad MBB as a funclet entry for CoreCLR as well as MSVCCXX, and
update state numbering to put the catchpad block rather than its normal
successor into the unwind map.
Reviewers: majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13492
llvm-svn: 249569
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index ed96742db7c..9e315194c98 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -1163,9 +1163,10 @@ void SelectionDAGBuilder::visitCatchPad(const CatchPadInst &I) { auto Pers = classifyEHPersonality(FuncInfo.Fn->getPersonalityFn()); bool IsMSVCCXX = Pers == EHPersonality::MSVC_CXX; bool IsSEH = isAsynchronousEHPersonality(Pers); + bool IsCoreCLR = Pers == EHPersonality::CoreCLR; MachineBasicBlock *CatchPadMBB = FuncInfo.MBB; - // In MSVC C++, catchblocks are funclets and need prologues. - if (IsMSVCCXX) + // In MSVC C++ and CoreCLR, catchblocks are funclets and need prologues. + if (IsMSVCCXX || IsCoreCLR) CatchPadMBB->setIsEHFuncletEntry(); MachineBasicBlock *NormalDestMBB = FuncInfo.MBBMap[I.getNormalDest()]; |