[cfe-commits] r69010 - in /cfe/trunk: lib/CodeGen/CGExpr.cpp lib/Sema/SemaDecl.cpp test/CodeGenObjC/blocks-1.m

Chris Lattner clattner at apple.com
Mon Apr 13 19:33:30 PDT 2009


On Apr 13, 2009, at 5:57 PM, Mike Stump wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=69010&view=rev
> Log:
> Fixup CodeGen for __weak __block variables.  Radar 6756266

Thanks Mike.

>   if (VD && (VD->isBlockVarDecl() || isa<ParmVarDecl>(VD) ||
>         isa<ImplicitParamDecl>(VD))) {
>     LValue LV;
> +    bool GCable = VD->hasLocalStorage() && ! VD- 
> >getAttr<BlocksAttr>();

Please use hasAttr<>

> +++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon Apr 13 19:57:29 2009
> @@ -1803,7 +1803,8 @@
>     Invalid = true;
>   }
>
> -  if (NewVD->hasLocalStorage() && T.isObjCGCWeak())
> +  if (NewVD->hasLocalStorage() && T.isObjCGCWeak()
> +      && !NewVD->getAttr<BlocksAttr>())

Likewise,

-Chris



More information about the cfe-commits mailing list