[cfe-commits] r155649 - /cfe/trunk/lib/Serialization/ASTReader.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Apr 26 11:34:14 PDT 2012

Author: akirtzidis
Date: Thu Apr 26 13:34:14 2012
New Revision: 155649

URL: http://llvm.org/viewvc/llvm-project?rev=155649&view=rev
[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.


Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=155649&r1=155648&r2=155649&view=diff
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Apr 26 13:34:14 2012
@@ -5025,6 +5025,7 @@
          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

More information about the cfe-commits mailing list