diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-11 16:06:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-11 16:06:55 +0000 |
commit | f1de4649e917f891d24e0718d02ee904b9edbe9d (patch) | |
tree | a694b59141a1d8b67fb09fb8892cd3c59a522c83 /lib/Lex | |
parent | d25c623a59cac5d92dd1b34b0d73106b524390bd (diff) |
PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data is
referenced by other tables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 2f4ac986e4..4231f2a915 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -551,7 +551,7 @@ PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags) { // Construct the file lookup table. This will be used for mapping from // FileEntry*'s to cached tokens. - const unsigned char* FileTableOffset = EndTable + sizeof(uint32_t)*3; + const unsigned char* FileTableOffset = EndTable + sizeof(uint32_t)*2; const unsigned char* FileTable = BufBeg + ReadLE32(FileTableOffset); if (!(FileTable > BufBeg && FileTable < BufEnd)) { @@ -567,7 +567,7 @@ PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags) { // Get the location of the table mapping from persistent ids to the // data needed to reconstruct identifiers. - const unsigned char* IDTableOffset = EndTable + sizeof(uint32_t)*1; + const unsigned char* IDTableOffset = EndTable + sizeof(uint32_t)*0; const unsigned char* IData = BufBeg + ReadLE32(IDTableOffset); if (!(IData >= BufBeg && IData < BufEnd)) { @@ -576,7 +576,7 @@ PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags) { } // Get the location of the lexigraphically-sorted table of persistent IDs. - const unsigned char* SortedIdTableOffset = EndTable + sizeof(uint32_t)*2; + const unsigned char* SortedIdTableOffset = EndTable + sizeof(uint32_t)*1; const unsigned char* SortedIdTable = BufBeg + ReadLE32(SortedIdTableOffset); if (!(SortedIdTable >= BufBeg && SortedIdTable < BufEnd)) { InvalidPTH(Diags); @@ -584,7 +584,7 @@ PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags) { } // Get the location of the spelling cache. - const unsigned char* spellingBaseOffset = EndTable + sizeof(uint32_t)*4; + const unsigned char* spellingBaseOffset = EndTable + sizeof(uint32_t)*3; const unsigned char* spellingBase = BufBeg + ReadLE32(spellingBaseOffset); if (!(spellingBase >= BufBeg && spellingBase < BufEnd)) { InvalidPTH(Diags); |