aboutsummaryrefslogtreecommitdiff
path: root/lib
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
commita762514563bcbf52a016f7e6b6730cac035ac92c (patch)
tree8f6af73e13df8dc1f7324d36770651253248b0c2 /lib
parentbce8d4b0abc22c59d8a5d1537df22b0d13f25db8 (diff)
Fix a bug where write-barriers for assignment through reference
types was not being generated for objc pointers. // rdar://8681766. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 6bfafca857..286665da86 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/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);
}