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/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 89e14ba..04bf996 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -290,16 +290,16 @@
const char *BTName = NULL;
switch (BT->getKind()) {
case BuiltinType::Dependent:
- assert(0 && "Unexpected builtin type Dependent");
+ llvm_unreachable("Unexpected builtin type Dependent");
return llvm::DIType();
case BuiltinType::Overload:
- assert(0 && "Unexpected builtin type Overload");
+ llvm_unreachable("Unexpected builtin type Overload");
return llvm::DIType();
case BuiltinType::BoundMember:
- assert(0 && "Unexpected builtin type BoundMember");
+ llvm_unreachable("Unexpected builtin type BoundMember");
return llvm::DIType();
case BuiltinType::UnknownAny:
- assert(0 && "Unexpected builtin type UnknownAny");
+ llvm_unreachable("Unexpected builtin type UnknownAny");
return llvm::DIType();
case BuiltinType::NullPtr:
return DBuilder.
@@ -1543,7 +1543,7 @@
#define NON_CANONICAL_TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base) case Type::Class:
#include "clang/AST/TypeNodes.def"
- assert(false && "Dependent types cannot show up in debug information");
+ llvm_unreachable("Dependent types cannot show up in debug information");
case Type::ExtVector:
case Type::Vector: