Improve -UNDEBUG binary size. We don't need a different assert fail message for
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 26 Jul 2014 00:47:13 +0000 (00:47 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sat, 26 Jul 2014 00:47:13 +0000 (00:47 +0000)
each different enum value here.

llvm-svn: 213996

clang/lib/AST/Expr.cpp

index 5f559b7..1e52e53 100644 (file)
@@ -195,12 +195,12 @@ SourceLocation Expr::getExprLoc() const {
   case Stmt::NoStmtClass: llvm_unreachable("statement without class");
 #define ABSTRACT_STMT(type)
 #define STMT(type, base) \
-  case Stmt::type##Class: llvm_unreachable(#type " is not an Expr"); break;
+  case Stmt::type##Class: break;
 #define EXPR(type, base) \
   case Stmt::type##Class: return getExprLocImpl<type>(this, &type::getExprLoc);
 #include "clang/AST/StmtNodes.inc"
   }
-  llvm_unreachable("unknown statement kind");
+  llvm_unreachable("unknown expression kind");
 }
 
 //===----------------------------------------------------------------------===//