diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-03 23:28:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-03 23:28:44 +0000 |
commit | b18b1fd33f958264630fbae2602c81275bae8c9a (patch) | |
tree | ca843a1a83c6ddae594a6c26eab6d4a0458000bd /lib/Serialization/ASTReaderDecl.cpp | |
parent | 033a07e5fca459ed184369cfee7c90d82367a93a (diff) |
Introduce local -> global selector ID mapping into the AST
reader. Tested with the usual "gaps" method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index f9a99fc671..1f350f392d 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -1407,7 +1407,8 @@ ASTReader::DeclCursorForID(DeclID ID) { GlobalDeclMapType::iterator I = GlobalDeclMap.find(ID); assert(I != GlobalDeclMap.end() && "Corrupted global declaration map"); Module *M = I->second; - return RecordLocation(M, M->DeclOffsets[ID - M->BaseDeclID - 1]); + return RecordLocation(M, + M->DeclOffsets[ID - M->BaseDeclID - NUM_PREDEF_DECL_IDS]); } ASTReader::RecordLocation ASTReader::getLocalBitOffset(uint64_t GlobalOffset) { |