[cfe-commits] r136423 - in /cfe/trunk: include/clang/Serialization/ASTReader.h lib/Serialization/ASTReader.cpp

Jonathan D. Turner jonathan.d.turner at gmail.com
Thu Jul 28 16:15:22 PDT 2011


Author: jonturner
Date: Thu Jul 28 18:15:22 2011
New Revision: 136423

URL: http://llvm.org/viewvc/llvm-project?rev=136423&view=rev
Log:
Some documentation fixes so that we are explicit about which iteration order is source-order.  Also, removing unused NextInSource field of Module.


Modified:
    cfe/trunk/include/clang/Serialization/ASTReader.h
    cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=136423&r1=136422&r2=136423&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTReader.h Thu Jul 28 18:15:22 2011
@@ -374,9 +374,6 @@
   /// preprocessing record.
   unsigned NumPreallocatedPreprocessingEntities;
   
-  /// \brief The next module in source order.
-  Module *NextInSource;
-  
   /// \brief All the modules that loaded this one. Can contain NULL for
   /// directly loaded modules.
   SmallVector<Module *, 1> Loaders;
@@ -404,19 +401,22 @@
   ModuleManager(const FileSystemOptions &FSO);
   ~ModuleManager();
 
-  /// \brief Forward iterator to traverse all loaded modules
+  /// \brief Forward iterator to traverse all loaded modules.  This is reverse
+  /// source-order.
   ModuleIterator begin() { return Chain.begin(); }
   /// \brief Forward iterator end-point to traverse all loaded modules
   ModuleIterator end() { return Chain.end(); }
 
-  /// \brief Const forward iterator to traverse all loaded modules
+  /// \brief Const forward iterator to traverse all loaded modules.  This is 
+  /// in reverse source-order.
   ModuleConstIterator begin() const { return Chain.begin(); }
   /// \brief Const forward iterator end-point to traverse all loaded modules
   ModuleConstIterator end() const { return Chain.end(); }
 
-  /// \brief Reverse iterator to traverse all loaded modules
+  /// \brief Reverse iterator to traverse all loaded modules.  This is in 
+  /// source order.
   ModuleReverseIterator rbegin() { return Chain.rbegin(); }
-  /// \brief Reverse iterator end-point to traverse all loaded modules
+  /// \brief Reverse iterator end-point to traverse all loaded modules.
   ModuleReverseIterator rend() { return Chain.rend(); }
 
   /// \brief Returns the primary module associated with the manager, that is,

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=136423&r1=136422&r2=136423&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Jul 28 18:15:22 2011
@@ -5473,7 +5473,7 @@
     SelectorLookupTableData(0), SelectorLookupTable(0), LocalNumDecls(0),
     DeclOffsets(0), LocalNumCXXBaseSpecifiers(0), CXXBaseSpecifiersOffsets(0),
     LocalNumTypes(0), TypeOffsets(0), StatCache(0),
-    NumPreallocatedPreprocessingEntities(0), NextInSource(0)
+    NumPreallocatedPreprocessingEntities(0)
 {}
 
 Module::~Module() {
@@ -5498,8 +5498,6 @@
   const FileEntry *Entry = FileMgr.getFile(FileName);
   Modules[Entry] = Current;
 
-  if (Prev)
-    Prev->NextInSource = Current;
   Current->Loaders.push_back(Prev);
 
   return *Current;





More information about the cfe-commits mailing list