diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-07 22:43:34 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-07 22:43:34 +0000 |
commit | 03f83e58f75d2f762fa15ec2cf3392e392b6cbb9 (patch) | |
tree | 3766c0949494f1c4f8bcdecdf821b469b8477d3b /clang/lib/CodeGen/CGExpr.cpp | |
parent | 4e9f3795545265072d06cae1141c42ac4274c9b3 (diff) | |
download | bcm5719-llvm-03f83e58f75d2f762fa15ec2cf3392e392b6cbb9.tar.gz bcm5719-llvm-03f83e58f75d2f762fa15ec2cf3392e392b6cbb9.zip |
We only need to call SetObjCNonGC for local variables. No functionality change.
llvm-svn: 86410
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 62e16e8ba23..fbb593983de 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -819,14 +819,14 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { if (VD && (VD->isBlockVarDecl() || isa<ParmVarDecl>(VD) || isa<ImplicitParamDecl>(VD))) { LValue LV; - bool NonGCable = VD->hasLocalStorage() && - !VD->hasAttr<BlocksAttr>(); if (VD->hasExternalStorage()) { llvm::Value *V = CGM.GetAddrOfGlobalVar(VD); if (VD->getType()->isReferenceType()) V = Builder.CreateLoad(V, "tmp"); LV = LValue::MakeAddr(V, MakeQualifiers(E->getType())); } else { + bool NonGCable = VD->hasLocalStorage() && !VD->hasAttr<BlocksAttr>(); + llvm::Value *V = LocalDeclMap[VD]; assert(V && "DeclRefExpr not entered in LocalDeclMap?"); @@ -844,8 +844,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { if (VD->getType()->isReferenceType()) V = Builder.CreateLoad(V, "tmp"); LV = LValue::MakeAddr(V, Quals); + LValue::SetObjCNonGC(LV, NonGCable); } - LValue::SetObjCNonGC(LV, NonGCable); setObjCGCLValueClass(getContext(), E, LV); return LV; } |