From: Argyrios Kyrtzidis Date: Thu, 26 Apr 2012 18:34:14 +0000 (+0000) Subject: [PCH] In ASTReader::completeVisibleDeclsMap, after we loaded all visible decls, mark X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=394e5392febc66a5511003fd24d540c51beffdd9;p=clang [PCH] In ASTReader::completeVisibleDeclsMap, after we loaded all visible decls, mark the declaration context as not having external visible storage any more. This should improve performance as we won't needlessly reload the visible decls multiple times and seems to fix the i386 crash in rdar://11327522. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155649 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index fd0c171394..e0f996644b 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -5025,6 +5025,7 @@ void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) { I = Decls.begin(), E = Decls.end(); I != E; ++I) { SetExternalVisibleDeclsForName(DC, I->first, I->second); } + const_cast(DC)->setHasExternalVisibleStorage(false); } /// \brief Under non-PCH compilation the consumer receives the objc methods