[cfe-commits] r64951 - /cfe/trunk/lib/AST/ExprConstant.cpp
Mike Stump
mrs at apple.com
Wed Feb 18 13:44:49 PST 2009
Author: mrs
Date: Wed Feb 18 15:44:49 2009
New Revision: 64951
URL: http://llvm.org/viewvc/llvm-project?rev=64951&view=rev
Log:
Codegen for int (^bp)(int) = 0;
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=64951&r1=64950&r2=64951&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Wed Feb 18 15:44:49 2009
@@ -265,7 +265,8 @@
} // end anonymous namespace
static bool EvaluatePointer(const Expr* E, APValue& Result, EvalInfo &Info) {
- if (!E->getType()->isPointerType())
+ if (!E->getType()->isPointerType()
+ && !E->getType()->isBlockPointerType())
return false;
Result = PointerExprEvaluator(Info).Visit(const_cast<Expr*>(E));
return Result.isLValue();
@@ -1533,7 +1534,8 @@
return false;
Result.Val = APValue(sInt);
- } else if (getType()->isPointerType()) {
+ } else if (getType()->isPointerType()
+ || getType()->isBlockPointerType()) {
if (!EvaluatePointer(this, Result.Val, Info))
return false;
} else if (getType()->isRealFloatingType()) {
More information about the cfe-commits
mailing list