Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95848 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index a2fc5aa..53eafd7 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -158,10 +158,8 @@
llvm::Triple::ArchType Arch =
llvm::Triple(Split.first, "", "").getArch();
- if (Arch == llvm::Triple::UnknownArch) {
- Diag(clang::diag::err_drv_invalid_arch_name) << Arch;
- continue;
- }
+ if (Arch == llvm::Triple::UnknownArch)
+ Diag(clang::diag::err_drv_invalid_arch_name) << Split.first;
CCCClangArchs.insert(Arch);
}