From: Richard Smith Date: Sat, 26 Jul 2014 00:47:13 +0000 (+0000) Subject: Improve -UNDEBUG binary size. We don't need a different assert fail message for X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9828f93dfaf6e47550bd08e375bde22d38918d1;p=clang Improve -UNDEBUG binary size. We don't need a different assert fail message for each different enum value here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213996 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 5f559b7e5c..1e52e53532 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -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(this, &type::getExprLoc); #include "clang/AST/StmtNodes.inc" } - llvm_unreachable("unknown statement kind"); + llvm_unreachable("unknown expression kind"); } //===----------------------------------------------------------------------===//