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/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index ffd7955..d440624 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -96,7 +96,7 @@
 
 Decl *
 TemplateDeclInstantiator::VisitTranslationUnitDecl(TranslationUnitDecl *D) {
-  assert(false && "Translation units cannot be instantiated");
+  llvm_unreachable("Translation units cannot be instantiated");
   return D;
 }
 
@@ -110,7 +110,7 @@
 
 Decl *
 TemplateDeclInstantiator::VisitNamespaceDecl(NamespaceDecl *D) {
-  assert(false && "Namespaces cannot be instantiated");
+  llvm_unreachable("Namespaces cannot be instantiated");
   return D;
 }
 
@@ -701,7 +701,7 @@
 }
 
 Decl *TemplateDeclInstantiator::VisitEnumConstantDecl(EnumConstantDecl *D) {
-  assert(false && "EnumConstantDecls can only occur within EnumDecls.");
+  llvm_unreachable("EnumConstantDecls can only occur within EnumDecls.");
   return 0;
 }
 
@@ -3308,7 +3308,7 @@
     // and removed the need for implicit instantiation.
     switch (Var->getMostRecentDeclaration()->getTemplateSpecializationKind()) {
     case TSK_Undeclared:
-      assert(false && "Cannot instantitiate an undeclared specialization.");
+      llvm_unreachable("Cannot instantitiate an undeclared specialization.");
     case TSK_ExplicitInstantiationDeclaration:
     case TSK_ExplicitSpecialization:
       continue;  // No longer need to instantiate this type.