[cfe-commits] r55281 - in /cfe/trunk: include/clang/Lex/Preprocessor.h lib/Lex/PPCaching.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Sun Aug 24 05:29:47 PDT 2008
Author: akirtzidis
Date: Sun Aug 24 07:29:43 2008
New Revision: 55281
URL: http://llvm.org/viewvc/llvm-project?rev=55281&view=rev
Log:
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.
Modified:
cfe/trunk/include/clang/Lex/Preprocessor.h
cfe/trunk/lib/Lex/PPCaching.cpp
Modified: cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=55281&r1=55280&r2=55281&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/trunk/include/clang/Lex/Preprocessor.h Sun Aug 24 07:29:43 2008
@@ -277,22 +277,22 @@
void RemoveTopOfLexerStack();
/// 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.
+ /// until CommitBacktrackedTokens() 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.
+ /// be called multiple times and CommitBacktrackedTokens/Backtrack calls will
+ /// be combined with the EnableBacktrackAtThisPos calls in reverse order.
///
- /// NOTE: *DO NOT* forget to call either DisableBacktrack() or Backtrack() at
- /// some point after EnableBacktrackAtThisPos. If you don't, caching of tokens
- /// will continue indefinitely.
+ /// NOTE: *DO NOT* forget to call either CommitBacktrackedTokens or Backtrack
+ /// at some point after EnableBacktrackAtThisPos. If you don't, caching of
+ /// tokens will continue indefinitely.
///
void EnableBacktrackAtThisPos();
- /// DisableBacktrack - Disable the last EnableBacktrackAtThisPos() call.
- void DisableBacktrack();
+ /// CommitBacktrackedTokens - Disable the last EnableBacktrackAtThisPos call.
+ void CommitBacktrackedTokens();
/// Backtrack - Make Preprocessor re-lex the tokens that were lexed since
/// EnableBacktrackAtThisPos() was previously called.
Modified: cfe/trunk/lib/Lex/PPCaching.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPCaching.cpp?rev=55281&r1=55280&r2=55281&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPCaching.cpp (original)
+++ cfe/trunk/lib/Lex/PPCaching.cpp Sun Aug 24 07:29:43 2008
@@ -15,22 +15,22 @@
#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.
+/// EnableBacktrackAtThisPos - From the point that this method is called, and
+/// until CommitBacktrackedTokens() 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 CommitBacktrackedTokens/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() {
+/// CommitBacktrackedTokens - Disable the last EnableBacktrackAtThisPos call.
+void Preprocessor::CommitBacktrackedTokens() {
assert(!BacktrackPositions.empty()
&& "EnableBacktrackAtThisPos was not called!");
BacktrackPositions.pop_back();
More information about the cfe-commits
mailing list