summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-02 02:31:22 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-02 02:31:22 +0000
commit19c1706ecc2a8155f1b55e412e7fbdacdd3ebb73 (patch)
tree83d263b93be3909a9b27b1fbaafd140af5fa17b5 /clang/lib/Serialization
parent960755bafd57c28953b99d0579e29b43ce5da185 (diff)
downloadbcm5719-llvm-19c1706ecc2a8155f1b55e412e7fbdacdd3ebb73.tar.gz
bcm5719-llvm-19c1706ecc2a8155f1b55e412e7fbdacdd3ebb73.zip
[libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID. llvm-svn: 167280
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 80fb464c3fe..22f5aedd408 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -3822,7 +3822,7 @@ PreprocessedEntityID ASTReader::findNextPreprocessedEntity(
EndI = GlobalSLocOffsetMap.end(); SLocMapI != EndI; ++SLocMapI) {
ModuleFile &M = *SLocMapI->second;
if (M.NumPreprocessedEntities)
- return getGlobalPreprocessedEntityID(M, M.BasePreprocessedEntityID);
+ return M.BasePreprocessedEntityID;
}
return getTotalNumPreprocessedEntities();
@@ -3905,8 +3905,7 @@ ASTReader::findBeginPreprocessedEntity(SourceLocation BLoc) const {
if (PPI == pp_end)
return findNextPreprocessedEntity(SLocMapI);
- return getGlobalPreprocessedEntityID(M,
- M.BasePreprocessedEntityID + (PPI - pp_begin));
+ return M.BasePreprocessedEntityID + (PPI - pp_begin);
}
/// \brief Returns the first preprocessed entity ID that begins after \arg ELoc.
@@ -3935,8 +3934,7 @@ ASTReader::findEndPreprocessedEntity(SourceLocation ELoc) const {
if (PPI == pp_end)
return findNextPreprocessedEntity(SLocMapI);
- return getGlobalPreprocessedEntityID(M,
- M.BasePreprocessedEntityID + (PPI - pp_begin));
+ return M.BasePreprocessedEntityID + (PPI - pp_begin);
}
/// \brief Returns a pair of [Begin, End) indices of preallocated
OpenPOWER on IntegriCloud