diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-25 03:44:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-25 03:44:17 +0000 |
commit | fc9bae6f8bcbf65699cb30af3149906bd2f096f6 (patch) | |
tree | 064e3929e3f815d336a4c6d646b955ccee0c78a0 /llvm/lib/CodeGen | |
parent | aac670c1c818f02f7d6026a036e2c624170a41c6 (diff) | |
download | bcm5719-llvm-fc9bae6f8bcbf65699cb30af3149906bd2f096f6.tar.gz bcm5719-llvm-fc9bae6f8bcbf65699cb30af3149906bd2f096f6.zip |
Replace the -unwind-tables option with a per function flag. This is more
LTO friendly as we can now correctly merge files compiled with or without
-fasynchronous-unwind-tables.
llvm-svn: 132033
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/ARMException.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp index 0db28a636ad..5861fa4817f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp @@ -52,7 +52,7 @@ void ARMException::EndModule() { /// being emitted immediately after the function entry point. void ARMException::BeginFunction(const MachineFunction *MF) { Asm->OutStreamer.EmitFnStart(); - if (!Asm->MF->getFunction()->doesNotThrow() || UnwindTablesMandatory) + if (Asm->MF->getFunction()->needsUnwindTableEntry()) Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber())); } @@ -60,7 +60,7 @@ void ARMException::BeginFunction(const MachineFunction *MF) { /// EndFunction - Gather and emit post-function exception information. /// void ARMException::EndFunction() { - if (Asm->MF->getFunction()->doesNotThrow() && !UnwindTablesMandatory) + if (!Asm->MF->getFunction()->needsUnwindTableEntry()) Asm->OutStreamer.EmitCantUnwind(); else { Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_end", 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; |