[llvm-branch-commits] [cfe-branch] r72316 - in /cfe/branches/Apple/Dib: lib/CodeGen/CGExpr.cpp test/CodeGenObjC/blocks-2.m

Mike Stump mrs at apple.com
Fri May 22 21:40:00 PDT 2009


Author: mrs
Date: Fri May 22 23:40:00 2009
New Revision: 72316

URL: http://llvm.org/viewvc/llvm-project?rev=72316&view=rev
Log:
Merge in 72313:

Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
 - Otherwise we may incorrectly miss generation of some write barriers.

Added:
    cfe/branches/Apple/Dib/test/CodeGenObjC/blocks-2.m
      - copied unchanged from r72313, cfe/trunk/test/CodeGenObjC/blocks-2.m
Modified:
    cfe/branches/Apple/Dib/lib/CodeGen/CGExpr.cpp

Modified: cfe/branches/Apple/Dib/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/CodeGen/CGExpr.cpp?rev=72316&r1=72315&r2=72316&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/branches/Apple/Dib/lib/CodeGen/CGExpr.cpp Fri May 22 23:40:00 2009
@@ -686,7 +686,9 @@
 }
 
 LValue CodeGenFunction::EmitBlockDeclRefLValue(const BlockDeclRefExpr *E) {
-  return LValue::MakeAddr(GetAddrOfBlockDecl(E), 0);
+  return LValue::MakeAddr(GetAddrOfBlockDecl(E), 
+                          E->getType().getCVRQualifiers(),
+                          getContext().getObjCGCAttrKind(E->getType()));
 }
 
 LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) {





More information about the llvm-branch-commits mailing list