diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-18 00:43:07 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-18 00:43:07 +0000 |
commit | ac6b06df32e907cac388a92310650b5895c11241 (patch) | |
tree | 3c58c1025cf9f13f4f3e36099c3191aa50ca4d5c /lib/Basic/SourceManager.cpp | |
parent | 60e45d4c41479fb58ad14d97efd03418e8549509 (diff) |
Added conditional guard 'if (CurLexer)' when using SetCommentRetentionState().
This is because the PTHLexer will not support this method. Performance testing
on preprocessing Cocoa.h shows that this results in a negligible performance
difference (less than 1%).
I tried making Lexer::SetCommentRetentionState() an out-of-line function (a
precursor to making it a virtual function in PreprocessorLexer) and noticed a 1%
decrease in speed (it is called in a hot part of the Preprocessor).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions