diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 5a913410970..b1aa8d244c3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -591,13 +591,9 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) { } AsmPrinter::CFIMoveType AsmPrinter::needsCFIMoves() { - if (MAI->getExceptionHandlingType() == ExceptionHandling::DwarfCFI) { - if (UnwindTablesMandatory) - return CFI_M_EH; - - if (!MF->getFunction()->doesNotThrow()) - return CFI_M_EH; - } + if (MAI->getExceptionHandlingType() == ExceptionHandling::DwarfCFI && + MF->getFunction()->needsUnwindTableEntry()) + return CFI_M_EH; if (MMI->hasDebugInfo()) return CFI_M_Debug; |