aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 6179925..40bde20 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -162,9 +162,9 @@ static inline Align getFnStackAlignment(const TargetSubtargetInfo *STI,
}
MachineFunction::MachineFunction(Function &F, const LLVMTargetMachine &Target,
- const TargetSubtargetInfo &STI,
- unsigned FunctionNum, MachineModuleInfo &mmi)
- : F(F), Target(Target), STI(&STI), Ctx(mmi.getContext()), MMI(mmi) {
+ const TargetSubtargetInfo &STI, MCContext &Ctx,
+ unsigned FunctionNum)
+ : F(F), Target(Target), STI(&STI), Ctx(Ctx) {
FunctionNumber = FunctionNum;
init();
}
@@ -659,9 +659,9 @@ bool MachineFunction::needsFrameMoves() const {
// under this switch, we'd like .debug_frame to be precise when using -g. At
// this moment, there's no way to specify that some CFI directives go into
// .eh_frame only, while others go into .debug_frame only.
- return getMMI().hasDebugInfo() ||
- getTarget().Options.ForceDwarfFrameSection ||
- F.needsUnwindTableEntry();
+ return getTarget().Options.ForceDwarfFrameSection ||
+ F.needsUnwindTableEntry() ||
+ !F.getParent()->debug_compile_units().empty();
}
namespace llvm {