diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-27 00:01:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-27 00:01:05 +0000 |
commit | 277faca30c9f8f72b79f55695cbe3395ec246e7c (patch) | |
tree | 80ed507b156a6d73ba2cf5651e772dd55f7adee0 /include/clang/Lex/Preprocessor.h | |
parent | 528473335419f072f6eff25a4af07925c1692121 (diff) |
PTH: Use Token::setLiteralData() to directly store a pointer to cached spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading.
Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file):
- PTH generation time improves by 5%
- PTH reading improves by 0.3%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 095c1db1de..4e57069385 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -461,12 +461,6 @@ public: // If the token is carrying a literal data pointer, just use it. if (const char *D = Tok.getLiteralData()) return *D; - - if (PTH) { - const char *Data; - if (PTH->getSpelling(Tok.getLocation(), Data)) - return *Data; - } // Otherwise, fall back on getCharacterData, which is slower, but always // works. |