summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-11-30 23:49:01 +0000
committerMatthias Braun <matze@braunis.de>2016-11-30 23:49:01 +0000
commited14cb060420040e712ff159058e53c62a7326a0 (patch)
tree188dd87febe4d79ed3d1ad33ba403cbe708d9ac5 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentef331eff5aa56a70d5bef2e5cf3202a326d697e9 (diff)
downloadbcm5719-llvm-ed14cb060420040e712ff159058e53c62a7326a0.tar.gz
bcm5719-llvm-ed14cb060420040e712ff159058e53c62a7326a0.zip
Move most EH from MachineModuleInfo to MachineFunction
Most of the exception handling members in MachineModuleInfo is actually per function data (talks about the "current function") so it is better to keep it at the function instead of the module. This is a necessary step to have machine module passes work properly. Also: - Rename TidyLandingPads() to tidyLandingPads() - Use doxygen member groups instead of "//===- EH ---"... so it is clear where a group ends. - I had to add an ugly const_cast at two places in the AsmPrinter because the available MachineFunction pointers are const, but the code wants to call tidyLandingPads() in between (markFunctionEnd()/endFunction()). Differential Revision: https://reviews.llvm.org/D27227 llvm-svn: 288293
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 16e01395f2b..6d717b44eb7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1014,10 +1014,10 @@ bool SelectionDAGISel::PrepareEHLandingPad() {
// Add a label to mark the beginning of the landing pad. Deletion of the
// landing pad can thus be detected via the MachineModuleInfo.
- MCSymbol *Label = MF->getMMI().addLandingPad(MBB);
+ MCSymbol *Label = MF->addLandingPad(MBB);
// Assign the call site to the landing pad's begin label.
- MF->getMMI().setCallSiteLandingPad(Label, SDB->LPadToCallSiteMap[MBB]);
+ MF->setCallSiteLandingPad(Label, SDB->LPadToCallSiteMap[MBB]);
const MCInstrDesc &II = TII->get(TargetOpcode::EH_LABEL);
BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II)
OpenPOWER on IntegriCloud