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 | a53ab5c569f494e44344ab950ccd6289dfa2d3ef (patch) | |
tree | 1d43e95b1f844ecf8aa3a3df3e05933e51bab88f /lib/Driver/Driver.cpp | |
parent | b031eab1c07fa2c5bd74c7e92f7c938bf3304729 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 35e63989a3..7ab3278c7f 100644 --- a/lib/Driver/Driver.cpp +++ b/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 |