From: Jonathan D. Turner Date: Thu, 28 Jul 2011 23:15:22 +0000 (+0000) Subject: Some documentation fixes so that we are explicit about which iteration order is sourc... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4ae29ced808ae77914754a9e966513aa26b580b;p=clang Some documentation fixes so that we are explicit about which iteration order is source-order. Also, removing unused NextInSource field of Module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136423 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 13fec48f69..41cf09ad64 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -374,9 +374,6 @@ public: /// 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 Loaders; @@ -404,19 +401,22 @@ public: 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, diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index ce81dddc5d..34af0b70db 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -5473,7 +5473,7 @@ Module::Module(ModuleKind Kind) 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 @@ Module &ModuleManager::addModule(StringRef FileName, ModuleKind Type) { const FileEntry *Entry = FileMgr.getFile(FileName); Modules[Entry] = Current; - if (Prev) - Prev->NextInSource = Current; Current->Loaders.push_back(Prev); return *Current;