diff options
| author | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
| commit | 68584ed35ad819a1668e3f527ba7f5dd4ae6a333 (patch) | |
| tree | f92e4dc8a0ad0128f011a81e4ef954ff1ea7311c /lib/CodeGen/CGExpr.cpp | |
| parent | 0adea828ec9db09bf54ca4efa54b2a2f688726b5 (diff) | |
| download | clang-68584ed35ad819a1668e3f527ba7f5dd4ae6a333.tar.gz clang-68584ed35ad819a1668e3f527ba7f5dd4ae6a333.tar.bz2 clang-68584ed35ad819a1668e3f527ba7f5dd4ae6a333.tar.xz | |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index eb0db61115..51c5b3d7dd 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -668,7 +668,8 @@ 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>(); + bool NonGCable = VD->hasLocalStorage() && + !VD->hasAttr<BlocksAttr>(getContext()); if (VD->hasExternalStorage()) { llvm::Value *V = CGM.GetAddrOfGlobalVar(VD); if (VD->getType()->isReferenceType()) @@ -684,7 +685,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { // local static? if (!NonGCable) attr = getContext().getObjCGCAttrKind(E->getType()); - if (VD->hasAttr<BlocksAttr>()) { + if (VD->hasAttr<BlocksAttr>(getContext())) { bool needsCopyDispose = BlockRequiresCopying(VD->getType()); const llvm::Type *PtrStructTy = V->getType(); const llvm::Type *Ty = PtrStructTy; |
