[cfe-commits] r82021 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Tue Sep 15 23:17:29 PDT 2009
Author: ddunbar
Date: Wed Sep 16 01:17:29 2009
New Revision: 82021
URL: http://llvm.org/viewvc/llvm-project?rev=82021&view=rev
Log:
Incremental improvement to logic determining whether we emit unwind tables or
not.
- PR4932.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=82021&r1=82020&r2=82021&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Sep 16 01:17:29 2009
@@ -623,10 +623,17 @@
CmdArgs.push_back("--debug-pass=Arguments");
// FIXME: set --inline-threshhold=50 if (optimize_size || optimize
// < 3)
- if (Args.hasFlag(options::OPT_funwind_tables,
- options::OPT_fno_unwind_tables,
- (getToolChain().IsUnwindTablesDefault() &&
- !Args.hasArg(options::OPT_mkernel))))
+
+ // This is a coarse approximation of what llvm-gcc actually does, both
+ // -fasynchronous-unwind-tables and -fnon-call-exceptions interact in more
+ // complicated ways.
+ bool AsynchronousUnwindTables =
+ Args.hasFlag(options::OPT_fasynchronous_unwind_tables,
+ options::OPT_fno_asynchronous_unwind_tables,
+ getToolChain().IsUnwindTablesDefault() &&
+ !Args.hasArg(options::OPT_mkernel));
+ if (Args.hasFlag(options::OPT_funwind_tables, options::OPT_fno_unwind_tables,
+ AsynchronousUnwindTables))
CmdArgs.push_back("--unwind-tables=1");
else
CmdArgs.push_back("--unwind-tables=0");
More information about the cfe-commits
mailing list