aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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);
}