[cfe-commits] r86411 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Anders Carlsson
andersca at mac.com
Sat Nov 7 14:46:42 PST 2009
Author: andersca
Date: Sat Nov 7 16:46:42 2009
New Revision: 86411
URL: http://llvm.org/viewvc/llvm-project?rev=86411&view=rev
Log:
Reduce nesting, no functionality change.
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=86411&r1=86410&r2=86411&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Sat Nov 7 16:46:42 2009
@@ -824,28 +824,30 @@
if (VD->getType()->isReferenceType())
V = Builder.CreateLoad(V, "tmp");
LV = LValue::MakeAddr(V, MakeQualifiers(E->getType()));
- } else {
- bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>();
+ setObjCGCLValueClass(getContext(), E, LV);
+ return LV;
+ }
- llvm::Value *V = LocalDeclMap[VD];
- assert(V && "DeclRefExpr not entered in LocalDeclMap?");
+ bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>();
- Qualifiers Quals = MakeQualifiers(E->getType());
- // local variables do not get their gc attribute set.
- // local static?
- if (NonGCable) Quals.removeObjCGCAttr();
-
- if (VD->hasAttr<BlocksAttr>()) {
- V = Builder.CreateStructGEP(V, 1, "forwarding");
- V = Builder.CreateLoad(V, false);
- V = Builder.CreateStructGEP(V, getByRefValueLLVMField(VD),
- VD->getNameAsString());
- }
- if (VD->getType()->isReferenceType())
- V = Builder.CreateLoad(V, "tmp");
- LV = LValue::MakeAddr(V, Quals);
- LValue::SetObjCNonGC(LV, NonGCable);
+ llvm::Value *V = LocalDeclMap[VD];
+ assert(V && "DeclRefExpr not entered in LocalDeclMap?");
+
+ Qualifiers Quals = MakeQualifiers(E->getType());
+ // local variables do not get their gc attribute set.
+ // local static?
+ if (NonGCable) Quals.removeObjCGCAttr();
+
+ if (VD->hasAttr<BlocksAttr>()) {
+ V = Builder.CreateStructGEP(V, 1, "forwarding");
+ V = Builder.CreateLoad(V, false);
+ V = Builder.CreateStructGEP(V, getByRefValueLLVMField(VD),
+ VD->getNameAsString());
}
+ if (VD->getType()->isReferenceType())
+ V = Builder.CreateLoad(V, "tmp");
+ LV = LValue::MakeAddr(V, Quals);
+ LValue::SetObjCNonGC(LV, NonGCable);
setObjCGCLValueClass(getContext(), E, LV);
return LV;
}
More information about the cfe-commits
mailing list