From: Douglas Gregor Date: Fri, 11 Feb 2011 19:46:30 +0000 (+0000) Subject: Rename the operation that loads a preprocessed entity from a given offset to indicate... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a480293f726508ad9aed0be39e8c9779e84f2f2;p=clang Rename the operation that loads a preprocessed entity from a given offset to indicate that we're loading from an offset, not an index, lest one be confused. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125394 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index 5a3b85ddd4..afd7ae1187 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -250,7 +250,8 @@ namespace clang { virtual void ReadPreprocessedEntities() = 0; /// \brief Read the preprocessed entity at the given offset. - virtual PreprocessedEntity *ReadPreprocessedEntity(uint64_t Offset) = 0; + virtual PreprocessedEntity * + ReadPreprocessedEntityAtOffset(uint64_t Offset) = 0; }; /// \brief A record of the steps taken while preprocessing a source file, @@ -297,7 +298,7 @@ namespace clang { iterator end(bool OnlyLocalEntities = false); const_iterator begin(bool OnlyLocalEntities = false) const; const_iterator end(bool OnlyLocalEntities = false) const; - + /// \brief Add a new preprocessed entity to this record. void addPreprocessedEntity(PreprocessedEntity *Entity); diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index fc08c0a071..23701248d0 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -898,7 +898,7 @@ public: virtual void ReadPreprocessedEntities(); /// \brief Read the preprocessed entity at the given offset. - virtual PreprocessedEntity *ReadPreprocessedEntity(uint64_t Offset); + virtual PreprocessedEntity *ReadPreprocessedEntityAtOffset(uint64_t Offset); /// \brief Read the header file information for the given file entry. virtual HeaderFileInfo GetHeaderFileInfo(const FileEntry *FE); diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 1138cd7db0..00902e810c 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -1368,7 +1368,8 @@ void ASTUnit::RealizePreprocessedEntitiesFromPreamble() { for (unsigned I = 0, N = PreprocessedEntitiesInPreamble.size(); I != N; ++I) { if (PreprocessedEntity *PE - = External->ReadPreprocessedEntity(PreprocessedEntitiesInPreamble[I])) + = External->ReadPreprocessedEntityAtOffset( + PreprocessedEntitiesInPreamble[I])) PreprocessedEntities.push_back(PE); } diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 60eeb6c308..d2167376ff 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -2787,7 +2787,7 @@ void ASTReader::ReadPreprocessedEntities() { } } -PreprocessedEntity *ASTReader::ReadPreprocessedEntity(uint64_t Offset) { +PreprocessedEntity *ASTReader::ReadPreprocessedEntityAtOffset(uint64_t Offset) { PerFileData *F = 0; for (unsigned I = 0, N = Chain.size(); I != N; ++I) { if (Offset < Chain[I]->SizeInBits) {