Skip to content
Commit 59e003e5 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

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).

llvm-svn: 59477
parent f1e93292
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment