[cfe-commits] r91865 - /cfe/trunk/lib/Frontend/RewriteObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Dec 21 16:48:54 PST 2009
Author: fjahanian
Date: Mon Dec 21 18:48:54 2009
New Revision: 91865
URL: http://llvm.org/viewvc/llvm-project?rev=91865&view=rev
Log:
Template code for rewrite of __block variables - wip.
Modified:
cfe/trunk/lib/Frontend/RewriteObjC.cpp
Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=91865&r1=91864&r2=91865&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Mon Dec 21 18:48:54 2009
@@ -324,6 +324,7 @@
// Block specific rewrite rules.
void RewriteBlockCall(CallExpr *Exp);
void RewriteBlockPointerDecl(NamedDecl *VD);
+ void RewriteByRefVar(NamedDecl *VD);
Stmt *RewriteBlockDeclRefExpr(BlockDeclRefExpr *VD);
void RewriteBlockPointerFunctionArgs(FunctionDecl *FD);
@@ -4321,6 +4322,10 @@
return;
}
+void RewriteObjC::RewriteByRefVar(NamedDecl *ND) {
+ return;
+}
+
void RewriteObjC::CollectBlockDeclRefInfo(BlockExpr *Exp) {
// Add initializers for any closure decl refs.
GetBlockDeclRefExprs(Exp->getBody());
@@ -4665,6 +4670,8 @@
RewriteBlockPointerDecl(ND);
else if (ND->getType()->isFunctionPointerType())
CheckFunctionPointerDecl(ND->getType(), ND);
+ if (ND->hasAttr<BlocksAttr>())
+ RewriteByRefVar(ND);
}
if (TypedefDecl *TD = dyn_cast<TypedefDecl>(SD)) {
if (isTopLevelBlockPointerType(TD->getUnderlyingType()))
More information about the cfe-commits
mailing list