Fix crash when printing instructions that have a metadata attached but no parent.
[oota-llvm.git] / lib / Target / X86 / X86CallFrameOptimization.cpp
index 23990b01ba1818206e5eb8d6ca045d5fabc41e44..fc6ee1752f1f101aa076a0e7178d54961f86f157 100644 (file)
@@ -500,7 +500,8 @@ bool X86CallFrameOptimization::adjustCallSequence(MachineFunction &MF,
 
     // For debugging, when using SP-based CFA, we need to adjust the CFA
     // offset after each push.
-    if (!TFL->hasFP(MF) && MF.getMMI().usePreciseUnwindInfo())
+    // TODO: This is needed only if we require precise CFA.
+    if (!TFL->hasFP(MF))
       TFL->BuildCFI(MBB, std::next(Push), DL, 
                     MCCFIInstruction::createAdjustCfaOffset(nullptr, 4));