r230428 - Remove slow and apparently pointless updating of all identifiers at the start

Richard Smith richard-llvm at metafoo.co.uk
Tue Feb 24 17:45:32 PST 2015


Author: rsmith
Date: Tue Feb 24 19:45:32 2015
New Revision: 230428

URL: http://llvm.org/viewvc/llvm-project?rev=230428&view=rev
Log:
Remove slow and apparently pointless updating of all identifiers at the start
of writing out an AST file.

Modified:
    cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=230428&r1=230427&r2=230428&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Tue Feb 24 19:45:32 2015
@@ -4266,23 +4266,6 @@ void ASTWriter::WriteASTCore(Sema &SemaR
       getIdentifierRef(&Table.get(BuiltinNames[I]));
   }
 
-  // If there are any out-of-date identifiers, bring them up to date.
-  if (ExternalPreprocessorSource *ExtSource = PP.getExternalSource()) {
-    // Find out-of-date identifiers.
-    SmallVector<IdentifierInfo *, 4> OutOfDate;
-    for (IdentifierTable::iterator ID = PP.getIdentifierTable().begin(),
-                                IDEnd = PP.getIdentifierTable().end();
-         ID != IDEnd; ++ID) {
-      if (ID->second->isOutOfDate())
-        OutOfDate.push_back(ID->second);
-    }
-
-    // Update the out-of-date identifiers.
-    for (unsigned I = 0, N = OutOfDate.size(); I != N; ++I) {
-      ExtSource->updateOutOfDateIdentifier(*OutOfDate[I]);
-    }
-  }
-
   // If we saw any DeclContext updates before we started writing the AST file,
   // make sure all visible decls in those DeclContexts are written out.
   if (!UpdatedDeclContexts.empty()) {





More information about the cfe-commits mailing list