aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-23 02:52:12 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-23 02:52:12 +0000
commit8f174e173c1fa195151a86a8cbd7611dde5e2b1a (patch)
treeaf44fd8bbeda47794ac198c9710fcb9d3674992b /lib/Lex/PTHLexer.cpp
parent866bdf74547efe32c320554837ffce00fcc084fe (diff)
PTH:
- Encode the token length with 2 bytes instead of 4. - This reduces the size of the .pth file for Cocoa.h by 12%. - This speeds up PTH time (-Eonly) on Cocoa.h by 1.6%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r--lib/Lex/PTHLexer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index 1038e3b70c..252e2f87da 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -26,7 +26,7 @@
using namespace clang;
-#define DISK_TOKEN_SIZE (2+3*4)
+#define DISK_TOKEN_SIZE (2+4+4+2)
//===----------------------------------------------------------------------===//
// Utility methods for reading from the mmap'ed PTH file.
@@ -79,9 +79,7 @@ LexNextToken:
| (((uint32_t) CurPtrShadow[9]) << 24);
uint32_t Len = ((uint32_t) CurPtrShadow[10])
- | (((uint32_t) CurPtrShadow[11]) << 8)
- | (((uint32_t) CurPtrShadow[12]) << 16)
- | (((uint32_t) CurPtrShadow[13]) << 24);
+ | (((uint32_t) CurPtrShadow[11]) << 8);
CurPtr = (const char*) (CurPtrShadow + DISK_TOKEN_SIZE);