summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-11-18 22:39:16 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-11-18 22:39:16 +0000
commit148d113e556077a3cf20b213729d34b752cb1c46 (patch)
treee91747572d2695f0f30fe634406740fa730b5bed /clang/lib/CodeGen
parent7a55a32108982b9ed585c6e3fb2052a5d88409e8 (diff)
downloadbcm5719-llvm-148d113e556077a3cf20b213729d34b752cb1c46.tar.gz
bcm5719-llvm-148d113e556077a3cf20b213729d34b752cb1c46.zip
Fix a bug where write-barriers for assignment through reference
types was not being generated for objc pointers. // rdar://8681766. llvm-svn: 119751
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 6bfafca857e..286665da867 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -1198,7 +1198,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
V = Builder.CreateLoad(V, "tmp");
LValue LV = MakeAddrLValue(V, E->getType(), Alignment);
- if (NonGCable) {
+ if (NonGCable && !VD->getType()->isReferenceType()) {
LV.getQuals().removeObjCGCAttr();
LV.setNonGC(true);
}
OpenPOWER on IntegriCloud