summaryrefslogtreecommitdiffstats
path: root/clang/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
commit1bd0a550d0197ca3e336f8001357ad31d482713c (patch)
tree331d7c68d1f8faddb3c3d598fe3c10959a2b4dac /clang/lib/Lex/PTHLexer.cpp
parent66076a964b811334c436964df1fb82501d4a9f32 (diff)
downloadbcm5719-llvm-1bd0a550d0197ca3e336f8001357ad31d482713c.tar.gz
bcm5719-llvm-1bd0a550d0197ca3e336f8001357ad31d482713c.zip
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%. llvm-svn: 61364
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r--clang/lib/Lex/PTHLexer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp
index 1038e3b70cc..252e2f87daa 100644
--- a/clang/lib/Lex/PTHLexer.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud