diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-23 12:05:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-23 12:05:53 +0000 |
commit | bff73f7f2d0c9d566c08d1a50eed1fc04d97fa2f (patch) | |
tree | a3bf45e1927eee2dd71b7d58292204675f276673 /lib/Lex/PPCaching.cpp | |
parent | 0a04d77bde7e3a661c2b41b60630d125d09ed6ef (diff) |
Change line endings: CRLF -> LF
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPCaching.cpp')
-rw-r--r-- | lib/Lex/PPCaching.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/lib/Lex/PPCaching.cpp b/lib/Lex/PPCaching.cpp index e69eac65ff..5bed51eaa4 100644 --- a/lib/Lex/PPCaching.cpp +++ b/lib/Lex/PPCaching.cpp @@ -15,37 +15,37 @@ #include "clang/Lex/Preprocessor.h" using namespace clang; -/// EnableBacktrackAtThisPos - From the point that this method is called, and
-/// until DisableBacktrack() or Backtrack() is called, the Preprocessor keeps
-/// track of the lexed tokens so that a subsequent Backtrack() call will make
-/// the Preprocessor re-lex the same tokens.
-///
-/// Nested backtracks are allowed, meaning that EnableBacktrackAtThisPos can
-/// be called multiple times and DisableBacktrack/Backtrack calls will be
-/// combined with the EnableBacktrackAtThisPos calls in reverse order.
-void Preprocessor::EnableBacktrackAtThisPos() {
- CacheTokens = true;
- BacktrackPositions.push_back(CachedLexPos);
- EnterCachingLexMode();
-}
+/// EnableBacktrackAtThisPos - From the point that this method is called, and +/// until DisableBacktrack() or Backtrack() is called, the Preprocessor keeps +/// track of the lexed tokens so that a subsequent Backtrack() call will make +/// the Preprocessor re-lex the same tokens. +/// +/// Nested backtracks are allowed, meaning that EnableBacktrackAtThisPos can +/// be called multiple times and DisableBacktrack/Backtrack calls will be +/// combined with the EnableBacktrackAtThisPos calls in reverse order. +void Preprocessor::EnableBacktrackAtThisPos() { + CacheTokens = true; + BacktrackPositions.push_back(CachedLexPos); + EnterCachingLexMode(); +} -/// DisableBacktrack - Disable the last EnableBacktrackAtThisPos() call.
-void Preprocessor::DisableBacktrack() {
- assert(!BacktrackPositions.empty()
- && "EnableBacktrackAtThisPos was not called!");
- BacktrackPositions.pop_back();
- CacheTokens = !BacktrackPositions.empty();
-}
-
-/// Backtrack - Make Preprocessor re-lex the tokens that were lexed since
-/// EnableBacktrackAtThisPos() was previously called.
-void Preprocessor::Backtrack() {
- assert(!BacktrackPositions.empty()
- && "EnableBacktrackAtThisPos was not called!");
- CachedLexPos = BacktrackPositions.back();
- BacktrackPositions.pop_back();
- CacheTokens = !BacktrackPositions.empty();
-}
+/// DisableBacktrack - Disable the last EnableBacktrackAtThisPos() call. +void Preprocessor::DisableBacktrack() { + assert(!BacktrackPositions.empty() + && "EnableBacktrackAtThisPos was not called!"); + BacktrackPositions.pop_back(); + CacheTokens = !BacktrackPositions.empty(); +} + +/// Backtrack - Make Preprocessor re-lex the tokens that were lexed since +/// EnableBacktrackAtThisPos() was previously called. +void Preprocessor::Backtrack() { + assert(!BacktrackPositions.empty() + && "EnableBacktrackAtThisPos was not called!"); + CachedLexPos = BacktrackPositions.back(); + BacktrackPositions.pop_back(); + CacheTokens = !BacktrackPositions.empty(); +} void Preprocessor::CachingLex(Token &Result) { if (CachedLexPos < CachedTokens.size()) { |