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 | f5e2812e6966ec0ec37de50b151db3475e80f2dc (patch) | |
| tree | 764a8e5d482719fea098f8faa213c6b0f4f97725 /clang/lib/Lex | |
| parent | 4172d641d196ef75162c43be61205cf8ab1817f7 (diff) | |
| download | bcm5719-llvm-f5e2812e6966ec0ec37de50b151db3475e80f2dc.tar.gz bcm5719-llvm-f5e2812e6966ec0ec37de50b151db3475e80f2dc.zip | |
Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled().
llvm-svn: 59631
Diffstat (limited to 'clang/lib/Lex')
| -rw-r--r-- | clang/lib/Lex/PPCaching.cpp | 5 | ||||
| -rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 1 |
2 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Lex/PPCaching.cpp b/clang/lib/Lex/PPCaching.cpp index 1f39088d7f0..ed67754e6e7 100644 --- a/clang/lib/Lex/PPCaching.cpp +++ b/clang/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; diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 2d4d3a7324d..5e973269945 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -69,7 +69,6 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, InMacroArgs = false; NumCachedTokenLexers = 0; - CacheTokens = false; CachedLexPos = 0; // "Poison" __VA_ARGS__, which can only appear in the expansion of a macro. |

