Minor cleanup. No change otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119814 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 286665d..7682baa 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -1181,7 +1181,9 @@
     if (VD->hasExternalStorage() || VD->isFileVarDecl()) 
       return EmitGlobalVarDeclLValue(*this, E, VD);
 
-    bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>();
+    bool NonGCable = VD->hasLocalStorage() &&
+                     !VD->getType()->isReferenceType() &&
+                     !VD->hasAttr<BlocksAttr>();
 
     llvm::Value *V = LocalDeclMap[VD];
     if (!V && VD->isStaticLocal()) 
@@ -1198,7 +1200,7 @@
       V = Builder.CreateLoad(V, "tmp");
 
     LValue LV = MakeAddrLValue(V, E->getType(), Alignment);
-    if (NonGCable && !VD->getType()->isReferenceType()) {
+    if (NonGCable) {
       LV.getQuals().removeObjCGCAttr();
       LV.setNonGC(true);
     }