summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index b334263a823..efe7059a3a0 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -44,11 +44,11 @@ DwarfCFIExceptionBase::DwarfCFIExceptionBase(AsmPrinter *A)
void DwarfCFIExceptionBase::markFunctionEnd() {
endFragment();
- if (MMI->getLandingPads().empty())
- return;
-
// Map all labels and get rid of any dead landing pads.
- MMI->TidyLandingPads();
+ if (!Asm->MF->getLandingPads().empty()) {
+ MachineFunction *NonConstMF = const_cast<MachineFunction*>(Asm->MF);
+ NonConstMF->tidyLandingPads();
+ }
}
void DwarfCFIExceptionBase::endFragment() {
@@ -98,7 +98,7 @@ void DwarfCFIException::beginFunction(const MachineFunction *MF) {
const Function *F = MF->getFunction();
// If any landing pads survive, we need an EH table.
- bool hasLandingPads = !MMI->getLandingPads().empty();
+ bool hasLandingPads = !MF->getLandingPads().empty();
// See if we need frame move info.
AsmPrinter::CFIMoveType MoveType = Asm->needsCFIMoves();
@@ -170,7 +170,7 @@ void DwarfCFIException::beginFragment(const MachineBasicBlock *MBB,
/// endFunction - Gather and emit post-function exception information.
///
-void DwarfCFIException::endFunction(const MachineFunction *) {
+void DwarfCFIException::endFunction(const MachineFunction *MF) {
if (!shouldEmitPersonality)
return;
OpenPOWER on IntegriCloud