[cfe-commits] r146248 - /cfe/trunk/lib/AST/Expr.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Thu Dec 8 22:47:34 PST 2011
Author: rsmith
Date: Fri Dec 9 00:47:34 2011
New Revision: 146248
URL: http://llvm.org/viewvc/llvm-project?rev=146248&view=rev
Log:
Teach isConstantInitializer that numeric literals are constants, rather than
having it evaluate them. No change in functionality, but a speed up of about 5%
on some translation units in SPEC 445.gobmk.
Modified:
cfe/trunk/lib/AST/Expr.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=146248&r1=146247&r2=146248&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri Dec 9 00:47:34 2011
@@ -2466,6 +2466,8 @@
switch (getStmtClass()) {
default: break;
+ case IntegerLiteralClass:
+ case FloatingLiteralClass:
case StringLiteralClass:
case ObjCStringLiteralClass:
case ObjCEncodeExprClass:
More information about the cfe-commits
mailing list