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/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp
index 4fc6949..762a7c5 100644
--- a/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -1083,7 +1083,7 @@
if (DiagOpts->ShowColors) {
// Print diagnostic category in bold and color
switch (Level) {
- case Diagnostic::Ignored: assert(0 && "Invalid diagnostic type");
+ case Diagnostic::Ignored: llvm_unreachable("Invalid diagnostic type");
case Diagnostic::Note: OS.changeColor(noteColor, true); break;
case Diagnostic::Warning: OS.changeColor(warningColor, true); break;
case Diagnostic::Error: OS.changeColor(errorColor, true); break;
@@ -1092,7 +1092,7 @@
}
switch (Level) {
- case Diagnostic::Ignored: assert(0 && "Invalid diagnostic type");
+ case Diagnostic::Ignored: llvm_unreachable("Invalid diagnostic type");
case Diagnostic::Note: OS << "note: "; break;
case Diagnostic::Warning: OS << "warning: "; break;
case Diagnostic::Error: OS << "error: "; break;