mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132033 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user