summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-23 02:49:02 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-23 02:49:02 +0000
commit223db1c9e5f74450a520bc12ab85f037ffcd99bd (patch)
treebde16fec0ceec02ad35c597879664eac7550bbbb /clang/lib/CodeGen
parenteeac588471e34a23114d002cf8b9ad3bf1c7f846 (diff)
downloadbcm5719-llvm-223db1c9e5f74450a520bc12ab85f037ffcd99bd.tar.gz
bcm5719-llvm-223db1c9e5f74450a520bc12ab85f037ffcd99bd.zip
Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
- Otherwise we may incorrectly miss generation of some write barriers. llvm-svn: 72313
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 0b7ad05b305..2fe67542933 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -723,7 +723,9 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
}
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) {
OpenPOWER on IntegriCloud