aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-12-25 04:47:44 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-12-25 04:47:44 +0000
commiteaf5ec43ec52f650a00254d1c20d51fb7671aead (patch)
tree4d86fbb0e475df5bf9bfa69f3fe06925538db368 /lib/Sema/SemaDecl.cpp
parentdfb316613a40d0efc033c7bd0a49da59c915fc63 (diff)
Revert r171048, "Cache visibility of decls."
It broke stage2. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index e1d772b084..105ef49bd8 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1775,13 +1775,9 @@ bool Sema::mergeDeclAttribute(Decl *D, InheritableAttr *Attr) {
AA->getIntroduced(), AA->getDeprecated(),
AA->getObsoleted(), AA->getUnavailable(),
AA->getMessage());
- else if (VisibilityAttr *VA = dyn_cast<VisibilityAttr>(Attr)) {
+ else if (VisibilityAttr *VA = dyn_cast<VisibilityAttr>(Attr))
NewAttr = mergeVisibilityAttr(D, VA->getRange(), VA->getVisibility());
- if (NewAttr) {
- NamedDecl *ND = cast<NamedDecl>(D);
- ND->ClearLVCache();
- }
- } else if (DLLImportAttr *ImportA = dyn_cast<DLLImportAttr>(Attr))
+ else if (DLLImportAttr *ImportA = dyn_cast<DLLImportAttr>(Attr))
NewAttr = mergeDLLImportAttr(D, ImportA->getRange());
else if (DLLExportAttr *ExportA = dyn_cast<DLLExportAttr>(Attr))
NewAttr = mergeDLLExportAttr(D, ExportA->getRange());
@@ -6615,7 +6611,7 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init,
}
VDecl->setTypeSourceInfo(DeducedType);
VDecl->setType(DeducedType->getType());
- VDecl->ClearLVCache();
+ VDecl->ClearLinkageCache();
// In ARC, infer lifetime.
if (getLangOpts().ObjCAutoRefCount && inferObjCARCLifetime(VDecl))