diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-18 01:04:47 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-18 01:04:47 +0000 |
commit | f6452c5421c5db5a7ceff581525f286931d97f1a (patch) | |
tree | b0e40cb237bcbfd90d09a4975f58439b7b66d3ed /include/clang/Lex/Preprocessor.h | |
parent | 890e3f6742f70e581368be1826d613f16f0d236d (diff) |
Add hooks to use PTHLexer::Lex instead of Lexer::Lex when CurLexer is null.
Performance tests on Cocoa.h (using the regular Lexer) shows no performance
difference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index d87813da02..f048923a67 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -330,6 +330,8 @@ public: void Lex(Token &Result) { if (CurLexer) CurLexer->Lex(Result); + else if (CurPTHLexer) + CurPTHLexer->Lex(Result); else if (CurTokenLexer) CurTokenLexer->Lex(Result); else |