[cfe-commits] r60581 - /cfe/trunk/lib/AST/ExprConstant.cpp
Anders Carlsson
andersca at mac.com
Thu Dec 4 21:18:06 PST 2008
Author: andersca
Date: Thu Dec 4 23:18:05 2008
New Revision: 60581
URL: http://llvm.org/viewvc/llvm-project?rev=60581&view=rev
Log:
Handle __builtin___CFStringMakeConstantString in Expr::Evaluate.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=60581&r1=60580&r2=60581&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Dec 4 23:18:05 2008
@@ -207,6 +207,7 @@
APValue VisitBinaryOperator(const BinaryOperator *E);
APValue VisitCastExpr(const CastExpr* E);
+ APValue VisitCallExpr(CallExpr *E);
APValue VisitUnaryOperator(const UnaryOperator *E);
APValue VisitObjCStringLiteral(ObjCStringLiteral *E)
{ return APValue(E, 0); }
@@ -266,7 +267,6 @@
return APValue();
}
-
APValue PointerExprEvaluator::VisitCastExpr(const CastExpr* E) {
const Expr* SubExpr = E->getSubExpr();
@@ -299,6 +299,15 @@
return APValue();
}
+APValue PointerExprEvaluator::VisitCallExpr(CallExpr *E)
+{
+ switch (E->isBuiltinCall()) {
+ default: return APValue();
+ case Builtin::BI__builtin___CFStringMakeConstantString:
+ return APValue(E, 0);
+ }
+}
+
APValue PointerExprEvaluator::VisitConditionalOperator(ConditionalOperator *E) {
bool BoolResult;
if (!HandleConversionToBool(E->getCond(), BoolResult, Info))
More information about the cfe-commits
mailing list