aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-29 00:56:45 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-29 00:56:45 +0000
commit9827a8049a793f23c62ade8f24f0c66c2dbf6741 (patch)
treeef3066d41031fd9989a1bf34e0e2303bfea0ce45 /lib/Serialization/ASTReaderDecl.cpp
parent93f1322684e928a559286ba1c7cb83af077aa658 (diff)
In the ASTReader, replace the continuous range maps whose value types
were (Module*, Offset) with equivalent maps whose value type is just a Module*. The offsets have moved into corresponding "Base" fields within the Module itself, where they will also be helpful for local->global translation (eventually). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index 5b36743992..546ca4dbe4 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -1406,8 +1406,8 @@ ASTReader::DeclCursorForIndex(unsigned Index, DeclID ID) {
GlobalDeclMapType::iterator I = GlobalDeclMap.find(ID);
assert(I != GlobalDeclMap.end() && "Corrupted global declaration map");
- return RecordLocation(I->second.first,
- I->second.first->DeclOffsets[Index + I->second.second]);
+ Module *M = I->second;
+ return RecordLocation(M, M->DeclOffsets[Index - M->BaseDeclID]);
}
ASTReader::RecordLocation ASTReader::getLocalBitOffset(uint64_t GlobalOffset) {