diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-04-07 00:01:31 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-04-07 00:01:31 +0000 |
commit | 706c2350134301bda7eff396651e3e489a57ca89 (patch) | |
tree | 7ff845cce3cdc2030d26675b4f64be224e95719e /clang/lib/Driver/Driver.cpp | |
parent | 372787fc19ac0847934c1ff490452dfd590392d2 (diff) | |
download | bcm5719-llvm-706c2350134301bda7eff396651e3e489a57ca89.tar.gz bcm5719-llvm-706c2350134301bda7eff396651e3e489a57ca89.zip |
[driver] In general, the driver claims redundant args and uses the last arg.
However, the '-x' option has special handling and wasn't following this
paradigm. Fix it to do so by claiming the arg as we parse the '-x' option.
rdar://11203340
llvm-svn: 154231
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 35e63989a3c..7ab3278c7f6 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1003,6 +1003,7 @@ void Driver::BuildInputs(const ToolChain &TC, const DerivedArgList &Args, } else if (A->getOption().matches(options::OPT_x)) { InputTypeArg = A; InputType = types::lookupTypeForTypeSpecifier(A->getValue(Args)); + A->claim(); // Follow gcc behavior and treat as linker input for invalid -x // options. Its not clear why we shouldn't just revert to unknown; but |