diff options
author | Dale Johannesen <dalej@apple.com> | 2008-04-08 00:10:24 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-04-08 00:10:24 +0000 |
commit | 344aec29522f2fb6907247feed07e58ed7df4046 (patch) | |
tree | 4c599bb8039c1719c0e6fb5ccbb6fe474011f1e3 /llvm/lib/CodeGen/DwarfWriter.cpp | |
parent | a9077ab6b7f3d7a73ea72fa59ed8d6c2810476cc (diff) | |
download | bcm5719-llvm-344aec29522f2fb6907247feed07e58ed7df4046.tar.gz bcm5719-llvm-344aec29522f2fb6907247feed07e58ed7df4046.zip |
Implement new llc flag -disable-required-unwind-tables.
Corresponds to -fno-unwind-tables (usually default in gcc).
llvm-svn: 49361
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 947b420cd51..6cdc91e1f72 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -2905,8 +2905,11 @@ private: // If there are no calls then you can't unwind. This may mean we can // omit the EH Frame, but some environments do not handle weak absolute - // symbols. + // symbols. + // If UnwindTablesOptional is not set we cannot do this optimization; the + // unwind info is to be available for non-EH uses. if (!EHFrameInfo.hasCalls && + UnwindTablesOptional && ((linkage != Function::WeakLinkage && linkage != Function::LinkOnceLinkage) || !TAI->getWeakDefDirective() || @@ -3427,7 +3430,9 @@ public: shouldEmitTable = true; // See if we need frame move info. - if (MMI->hasDebugInfo() || !MF->getFunction()->doesNotThrow()) + if (MMI->hasDebugInfo() || + !MF->getFunction()->doesNotThrow() || + !UnwindTablesOptional) shouldEmitMoves = true; if (shouldEmitMoves || shouldEmitTable) |