diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-19 20:40:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-09-19 20:40:02 +0000 |
commit | d67164e3cd1be22e87456cfd627210afc2b2dc6b (patch) | |
tree | 72aa8b3c62939cd6589a624474c97e3bfe915825 /clang | |
parent | b4199b659bca6f9a18f9b42687406b3844d37381 (diff) | |
download | bcm5719-llvm-d67164e3cd1be22e87456cfd627210afc2b2dc6b.tar.gz bcm5719-llvm-d67164e3cd1be22e87456cfd627210afc2b2dc6b.zip |
Const-ify some methods in ASTReader.
llvm-svn: 140054
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Serialization/ASTReader.h | 4 | ||||
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h index 9f3973bc24a..ce980f775b1 100644 --- a/clang/include/clang/Serialization/ASTReader.h +++ b/clang/include/clang/Serialization/ASTReader.h @@ -1142,7 +1142,7 @@ public: unsigned &Idx); /// \brief Read a source location from raw form. - SourceLocation ReadSourceLocation(Module &Module, unsigned Raw) { + SourceLocation ReadSourceLocation(Module &Module, unsigned Raw) const { unsigned Flag = Raw & (1U << 31); unsigned Offset = Raw & ~(1U << 31); assert(Module.SLocRemap.find(Offset) != Module.SLocRemap.end() && @@ -1215,7 +1215,7 @@ public: /// \brief Determine the global preprocessed entity ID that corresponds to /// the given local ID within the given module. serialization::PreprocessedEntityID - getGlobalPreprocessedEntityID(Module &M, unsigned LocalID); + getGlobalPreprocessedEntityID(Module &M, unsigned LocalID) const; /// \brief Note that the identifier is a macro whose record will be loaded /// from the given AST file at the given (file-local) offset. diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 6c0afb59b40..30e3c8cb920 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -1440,8 +1440,8 @@ PreprocessedEntity *ASTReader::LoadPreprocessedEntity(Module &F) { } PreprocessedEntityID -ASTReader::getGlobalPreprocessedEntityID(Module &M, unsigned LocalID) { - ContinuousRangeMap<uint32_t, int, 2>::iterator +ASTReader::getGlobalPreprocessedEntityID(Module &M, unsigned LocalID) const { + ContinuousRangeMap<uint32_t, int, 2>::const_iterator I = M.PreprocessedEntityRemap.find(LocalID - NUM_PREDEF_PP_ENTITY_IDS); assert(I != M.PreprocessedEntityRemap.end() && "Invalid index into preprocessed entity index remap"); |