[cfe-commits] r129919 - in /cfe/trunk: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/ToolChains.cpp
Daniel Dunbar
daniel at zuster.org
Thu Apr 21 10:41:34 PDT 2011
Author: ddunbar
Date: Thu Apr 21 12:41:34 2011
New Revision: 129919
URL: http://llvm.org/viewvc/llvm-project?rev=129919&view=rev
Log:
Driver: Tweak -Xarch diags a bit more, we can't actually differentiate between
unknown and "required more arguments", but only the latter should be feasible in
practice.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
cfe/trunk/lib/Driver/ToolChains.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=129919&r1=129918&r2=129919&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Thu Apr 21 12:41:34 2011
@@ -39,8 +39,6 @@
"invalid Darwin version number: %0">;
def err_drv_missing_argument : Error<
"argument to '%0' is missing (expected %1 %plural{1:value|:values}1)">;
-def err_drv_invalid_Xarch_argument_unknown : Error<
- "invalid Xarch argument: '%0', option is unrecognized">;
def err_drv_invalid_Xarch_argument_with_args : Error<
"invalid Xarch argument: '%0', options requiring arguments are unsupported">;
def err_drv_invalid_Xarch_argument_isdriver : Error<
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=129919&r1=129918&r2=129919&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Apr 21 12:41:34 2011
@@ -555,11 +555,7 @@
// driver behavior; that isn't going to work in our model. We
// use isDriverOption() as an approximation, although things
// like -O4 are going to slip through.
- if (!XarchArg) {
- getDriver().Diag(clang::diag::err_drv_invalid_Xarch_argument_unknown)
- << A->getAsString(Args);
- continue;
- } else if (Index > Prev + 1) {
+ if (!XarchArg || Index > Prev + 1) {
getDriver().Diag(clang::diag::err_drv_invalid_Xarch_argument_with_args)
<< A->getAsString(Args);
continue;
More information about the cfe-commits
mailing list