diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-19 14:23:14 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-11-19 14:23:14 +0000 |
commit | fad03b2b38a3baea4b67e79e676fee15078e3258 (patch) | |
tree | 3a64767844c46fbb0e0efee2a28b6c1af316e0da /lib/Lex/PPCaching.cpp | |
parent | 371d16f45aeec61c1d07687f763d92137e133642 (diff) |
Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPCaching.cpp')
-rw-r--r-- | lib/Lex/PPCaching.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Lex/PPCaching.cpp b/lib/Lex/PPCaching.cpp index 1f39088d7f..ed67754e6e 100644 --- a/lib/Lex/PPCaching.cpp +++ b/lib/Lex/PPCaching.cpp @@ -24,7 +24,6 @@ using namespace clang; /// be called multiple times and CommitBacktrackedTokens/Backtrack calls will /// be combined with the EnableBacktrackAtThisPos calls in reverse order. void Preprocessor::EnableBacktrackAtThisPos() { - CacheTokens = true; BacktrackPositions.push_back(CachedLexPos); EnterCachingLexMode(); } @@ -34,7 +33,6 @@ void Preprocessor::CommitBacktrackedTokens() { assert(!BacktrackPositions.empty() && "EnableBacktrackAtThisPos was not called!"); BacktrackPositions.pop_back(); - CacheTokens = !BacktrackPositions.empty(); } /// Backtrack - Make Preprocessor re-lex the tokens that were lexed since @@ -44,7 +42,6 @@ void Preprocessor::Backtrack() { && "EnableBacktrackAtThisPos was not called!"); CachedLexPos = BacktrackPositions.back(); BacktrackPositions.pop_back(); - CacheTokens = !BacktrackPositions.empty(); } void Preprocessor::CachingLex(Token &Result) { @@ -56,7 +53,7 @@ void Preprocessor::CachingLex(Token &Result) { ExitCachingLexMode(); Lex(Result); - if (!CacheTokens) { + if (!isBacktrackEnabled()) { // All cached tokens were consumed. CachedTokens.clear(); CachedLexPos = 0; |