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 | 8527e3a72729fd98cda2e40dcd1b9a7289fc1f76 (patch) | |
tree | b3af4756176a136416fc1ce9c8fbfa6a28753679 /clang/lib/Lex/PTHLexer.cpp | |
parent | 185fc298204a1c85c10dcc28f9db4e7aafa95b50 (diff) | |
download | bcm5719-llvm-8527e3a72729fd98cda2e40dcd1b9a7289fc1f76.tar.gz bcm5719-llvm-8527e3a72729fd98cda2e40dcd1b9a7289fc1f76.zip |
PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data is
referenced by other tables.
llvm-svn: 64304
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r-- | clang/lib/Lex/PTHLexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp index 2f4ac986e4b..4231f2a915f 100644 --- a/clang/lib/Lex/PTHLexer.cpp +++ b/clang/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); |