[cfe-commits] r59472 - in /cfe/trunk: include/clang/Lex/Preprocessor.h lib/Lex/PPLexerChange.cpp

Chris Lattner clattner at apple.com
Thu Nov 20 15:23:23 PST 2008


On Nov 19, 2008, at 11:59 PM, Ted Kremenek wrote:

>
> On Nov 19, 2008, at 11:26 PM, Chris Lattner wrote:
>
>>>
>>> /// #included, and macros currently being expanded from, not  
>>> counting
>>> /// CurLexer/CurTokenLexer.
>>> struct IncludeStackInfo {
>>> -    Lexer *TheLexer;
>>> +    Lexer                 *TheLexer;
>>> +    PTHLexer              *ThePTHLexer;
>>> +    PreprocessorLexer     *ThePPLexer;
>>> +    TokenLexer            *TheTokenLexer;
>>>   const DirectoryLookup *TheDirLookup;
>>
>> Do you plan to kill off ThePTHLexer/TheLexer?  We should just need  
>> ThePPLexer eventually.
>
> Maybe.  Depends on the overhead of doing virtual calls versus  
> relying on the branch predicator to make things fast.

If the cost is only paid when you enter/exit a function, it probably  
won't be noticable at all.

-Chris



More information about the cfe-commits mailing list