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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129919 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 75cb935..c5d34da 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -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;