[cfe-commits] r55235 - /cfe/trunk/lib/Lex/PPCaching.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Sat Aug 23 05:05:55 PDT 2008
Author: akirtzidis
Date: Sat Aug 23 07:05:53 2008
New Revision: 55235
URL: http://llvm.org/viewvc/llvm-project?rev=55235&view=rev
Log:
Change line endings: CRLF -> LF
Modified:
cfe/trunk/lib/Lex/PPCaching.cpp
Modified: cfe/trunk/lib/Lex/PPCaching.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPCaching.cpp?rev=55235&r1=55234&r2=55235&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPCaching.cpp (original)
+++ cfe/trunk/lib/Lex/PPCaching.cpp Sat Aug 23 07:05:53 2008
@@ -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();
-}
-
-/// 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();
-}
+/// 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();
+}
void Preprocessor::CachingLex(Token &Result) {
if (CachedLexPos < CachedTokens.size()) {
More information about the cfe-commits
mailing list