[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.

llvm-svn: 155649
This commit is contained in:
Argyrios Kyrtzidis 2012-04-26 18:34:14 +00:00
parent 3c79d88f06
commit 0334d3300d
1 changed files with 1 additions and 0 deletions

View File

@ -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<DeclContext *>(DC)->setHasExternalVisibleStorage(false);
}
/// \brief Under non-PCH compilation the consumer receives the objc methods