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/OptTable.cpp b/lib/Driver/OptTable.cpp
index 780ea56..81e2022 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -116,7 +116,7 @@
if (!(getInfo(i) < getInfo(i + 1))) {
getOption(i)->dump();
getOption(i + 1)->dump();
- assert(0 && "Options are not in order!");
+ llvm_unreachable("Options are not in order!");
}
}
#endif
@@ -268,10 +268,10 @@
// Add metavar, if used.
switch (Opts.getOptionKind(Id)) {
case Option::GroupClass: case Option::InputClass: case Option::UnknownClass:
- assert(0 && "Invalid option with help text.");
+ llvm_unreachable("Invalid option with help text.");
case Option::MultiArgClass:
- assert(0 && "Cannot print metavar for this kind of option.");
+ llvm_unreachable("Cannot print metavar for this kind of option.");
case Option::FlagClass:
break;