Switch assert(0/false) llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 92c3ec9..b11fc89 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -243,7 +243,7 @@
switch (Key) {
case Action::InputClass:
case Action::BindArchClass:
- assert(0 && "Invalid tool kind.");
+ llvm_unreachable("Invalid tool kind.");
case Action::PreprocessJobClass:
T = new tools::darwin::Preprocess(*this); break;
case Action::AnalyzeJobClass:
@@ -323,7 +323,7 @@
P.appendComponent("gcc");
switch (getTriple().getArch()) {
default:
- assert(0 && "Invalid Darwin arch!");
+ llvm_unreachable("Invalid Darwin arch!");
case llvm::Triple::x86:
case llvm::Triple::x86_64:
P.appendComponent("i686-apple-darwin10");
@@ -1002,7 +1002,7 @@
switch (Key) {
case Action::InputClass:
case Action::BindArchClass:
- assert(0 && "Invalid tool kind.");
+ llvm_unreachable("Invalid tool kind.");
case Action::PreprocessJobClass:
T = new tools::gcc::Preprocess(*this); break;
case Action::PrecompileJobClass:
@@ -1093,7 +1093,7 @@
case Action::AnalyzeJobClass:
T = new tools::Clang(*this); break;
default:
- assert(false && "Unsupported action for TCE target.");
+ llvm_unreachable("Unsupported action for TCE target.");
}
}
return *T;
@@ -1805,7 +1805,7 @@
case Action::LipoJobClass:
case Action::DsymutilJobClass:
case Action::VerifyJobClass:
- assert(0 && "Invalid tool kind.");
+ llvm_unreachable("Invalid tool kind.");
case Action::PreprocessJobClass:
case Action::PrecompileJobClass:
case Action::AnalyzeJobClass: