summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-16 06:17:29 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-16 06:17:29 +0000
commit306945d3d0e5b01ba51685108b75fecbc772fc93 (patch)
tree6959ba14c640068f8c5bc33fbb6ed5702e1a0a3a /clang
parent3828c2fa80b03bc62f54097a957e5c4ab7255028 (diff)
downloadbcm5719-llvm-306945d3d0e5b01ba51685108b75fecbc772fc93.tar.gz
bcm5719-llvm-306945d3d0e5b01ba51685108b75fecbc772fc93.zip
Incremental improvement to logic determining whether we emit unwind tables or
not. - PR4932. llvm-svn: 82021
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Driver/Tools.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index cca52de7ec5..da533f16bd8 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -623,10 +623,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
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");
OpenPOWER on IntegriCloud