[cfe-commits] r167280 - /cfe/trunk/lib/Serialization/ASTReader.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Nov 1 19:31:22 PDT 2012
Author: akirtzidis
Date: Thu Nov 1 21:31:22 2012
New Revision: 167280
URL: http://llvm.org/viewvc/llvm-project?rev=167280&view=rev
Log:
[libclang] Correct how the index inside the local preprocessed entities array
is getting converted to a global PreprocessedEntityID.
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=167280&r1=167279&r2=167280&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Nov 1 21:31:22 2012
@@ -3822,7 +3822,7 @@
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 @@
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 @@
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
More information about the cfe-commits
mailing list