diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-12 21:41:41 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-12 21:41:41 +0000 |
commit | d1d239f35c2434c6952747985f00f14003248b68 (patch) | |
tree | 2cd87805569a91a3580386398b117c41b8808d4e /clang/lib/Lex/PPCaching.cpp | |
parent | f4cc7dcf9bd457cb684c2214fdd1dede87bde245 (diff) | |
download | bcm5719-llvm-d1d239f35c2434c6952747985f00f14003248b68.tar.gz bcm5719-llvm-d1d239f35c2434c6952747985f00f14003248b68.zip |
Remove the check for repeated tok::eofs, we are not supposed to go past eof so this code is
totally unnecessary.
llvm-svn: 108199
Diffstat (limited to 'clang/lib/Lex/PPCaching.cpp')
-rw-r--r-- | clang/lib/Lex/PPCaching.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/clang/lib/Lex/PPCaching.cpp b/clang/lib/Lex/PPCaching.cpp index 16fcaa365cb..33106591c3b 100644 --- a/clang/lib/Lex/PPCaching.cpp +++ b/clang/lib/Lex/PPCaching.cpp @@ -54,10 +54,7 @@ void Preprocessor::CachingLex(Token &Result) { } ExitCachingLexMode(); - // True if we consumed everything already. - bool PastEOF = CurPPLexer == 0 && CurTokenLexer == 0; - if (!PastEOF) - Lex(Result); + Lex(Result); if (!isBacktrackEnabled()) { // All cached tokens were consumed. @@ -66,12 +63,10 @@ void Preprocessor::CachingLex(Token &Result) { return; } - // Cache the lexed token if it's not a repeated tok::eof. + // Cache the lexed token. EnterCachingLexMode(); - if (!PastEOF) { - CachedTokens.push_back(Result); - ++CachedLexPos; - } + CachedTokens.push_back(Result); + ++CachedLexPos; } void Preprocessor::EnterCachingLexMode() { |