[cfe-commits] r119814 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Nov 19 10:17:09 PST 2010
Author: fjahanian
Date: Fri Nov 19 12:17:09 2010
New Revision: 119814
URL: http://llvm.org/viewvc/llvm-project?rev=119814&view=rev
Log:
Minor cleanup. No change otherwise.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=119814&r1=119813&r2=119814&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Fri Nov 19 12:17:09 2010
@@ -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);
}
More information about the cfe-commits
mailing list