summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-07 19:04:18 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-07 19:04:18 +0000
commita3cfbe33dacca77b89ee3733ef9c5c2a44a70ca8 (patch)
tree6daf69d0e2a957b8dbd2a940b832dcf5dc2e0dab /clang/lib/Driver/Driver.cpp
parentb01824afb548fb0f6b6a0c5f75fb423b643ba5dd (diff)
downloadbcm5719-llvm-a3cfbe33dacca77b89ee3733ef9c5c2a44a70ca8.tar.gz
bcm5719-llvm-a3cfbe33dacca77b89ee3733ef9c5c2a44a70ca8.zip
Driver: Add 'q' flag for options which shouldn't be reported as unused.
- <rdar://problem/6756295> warning about '-dynamic' argument unused during compilation seems incorrect llvm-svn: 68535
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 68ff8bc8b0c..f9a82ff78d4 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -802,7 +802,8 @@ void Driver::BuildJobs(Compilation &C) const {
// If the user passed -Qunused-arguments or there were errors, don't
// warn about any unused arguments.
- if (Diags.getNumErrors() || C.getArgs().hasArg(options::OPT_Qunused_arguments))
+ if (Diags.getNumErrors() ||
+ C.getArgs().hasArg(options::OPT_Qunused_arguments))
return;
// Claim -### here.
@@ -816,6 +817,9 @@ void Driver::BuildJobs(Compilation &C) const {
// Diagnostic, so that extra values, position, and so on could be
// printed.
if (!A->isClaimed()) {
+ if (A->getOption().hasNoArgumentUnused())
+ continue;
+
// Suppress the warning automatically if this is just a flag,
// and it is an instance of an argument we already claimed.
const Option &Opt = A->getOption();
OpenPOWER on IntegriCloud