diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-19 18:17:09 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-19 18:17:09 +0000 |
| commit | 44a41d1c250f2acdae70d26bf30b2f5d55068dac (patch) | |
| tree | 44cf14ef8134d805ec135659e0be9fb4b2b90eb8 /clang/lib | |
| parent | e7d62020a7983e8b9c900d91f98366a1744e1799 (diff) | |
| download | bcm5719-llvm-44a41d1c250f2acdae70d26bf30b2f5d55068dac.tar.gz bcm5719-llvm-44a41d1c250f2acdae70d26bf30b2f5d55068dac.zip | |
Minor cleanup. No change otherwise.
llvm-svn: 119814
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 286665da867..7682baa8e59 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1181,7 +1181,9 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { 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 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { 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); } |

