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/Option.cpp b/lib/Driver/Option.cpp
index 90d21a3..f1ef7ab 100644
--- a/lib/Driver/Option.cpp
+++ b/lib/Driver/Option.cpp
@@ -61,7 +61,7 @@
llvm::errs() << "<";
switch (Kind) {
default:
- assert(0 && "Invalid kind");
+ llvm_unreachable("Invalid kind");
#define P(N) case N: llvm::errs() << #N; break
P(GroupClass);
P(InputClass);
@@ -114,7 +114,7 @@
}
Arg *OptionGroup::accept(const ArgList &Args, unsigned &Index) const {
- assert(0 && "accept() should never be called on an OptionGroup");
+ llvm_unreachable("accept() should never be called on an OptionGroup");
return 0;
}
@@ -123,7 +123,7 @@
}
Arg *InputOption::accept(const ArgList &Args, unsigned &Index) const {
- assert(0 && "accept() should never be called on an InputOption");
+ llvm_unreachable("accept() should never be called on an InputOption");
return 0;
}
@@ -132,7 +132,7 @@
}
Arg *UnknownOption::accept(const ArgList &Args, unsigned &Index) const {
- assert(0 && "accept() should never be called on an UnknownOption");
+ llvm_unreachable("accept() should never be called on an UnknownOption");
return 0;
}