summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-20 20:36:09 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-20 20:36:09 +0000
commite84a9daa1614b2b140283015a7308a518188b8c8 (patch)
treed5cbeaf3d77855d2335125b85383c22f4a172d48 /clang/lib/Frontend/PCHReader.cpp
parent2c441c6afe2791b2d5ba65c544c0853c00d95505 (diff)
downloadbcm5719-llvm-e84a9daa1614b2b140283015a7308a518188b8c8.tar.gz
bcm5719-llvm-e84a9daa1614b2b140283015a7308a518188b8c8.zip
Write the identifier table into the PCH file as an on-disk hash table
that also includes the contents of the IdentifierInfo itself (the various fields and flags, along with the chain of identifiers visible at the top level that have that name). We don't make any use of the hash table yet, except that our identifier ID -> string mapping points into the hash table now. llvm-svn: 69625
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index f1cb4d3cdce..e694a140d1f 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -2089,9 +2089,10 @@ IdentifierInfo *PCHReader::DecodeIdentifierInfo(unsigned ID) {
}
if (IdentifierData[ID - 1] & 0x01) {
- uint64_t Offset = IdentifierData[ID - 1];
+ uint64_t Offset = IdentifierData[ID - 1] >> 1;
IdentifierData[ID - 1] = reinterpret_cast<uint64_t>(
- &Context.Idents.get(IdentifierTable + Offset));
+ &Context.Idents.get(IdentifierTable + Offset));
+ // FIXME: also read the contents of the IdentifierInfo.
}
return reinterpret_cast<IdentifierInfo *>(IdentifierData[ID - 1]);
OpenPOWER on IntegriCloud