diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86MCInstLower.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86MCInstLower.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index 8878c9f169b..af386807cd7 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -1143,8 +1143,10 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) { const X86FrameLowering* FrameLowering = MF->getSubtarget<X86Subtarget>().getFrameLowering(); bool hasFP = FrameLowering->hasFP(*MF); - - bool NeedsDwarfCFI = MMI->usePreciseUnwindInfo(); + + // TODO: This is needed only if we require precise CFA. + bool NeedsDwarfCFI = + (MMI->hasDebugInfo() || MF->getFunction()->needsUnwindTableEntry()); int stackGrowth = -RI->getSlotSize(); if (NeedsDwarfCFI && !hasFP) { |