diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-24 12:29:43 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-24 12:29:43 +0000 |
commit | 75b34536d00e466b1a437bc83bbde9d3f55c9731 (patch) | |
tree | fa3d3ae1df9293216b3581079e51ebaf90128019 | |
parent | 0a854b53084e27cbaec7294d58428b812b18e446 (diff) | |
download | bcm5719-llvm-75b34536d00e466b1a437bc83bbde9d3f55c9731.tar.gz bcm5719-llvm-75b34536d00e466b1a437bc83bbde9d3f55c9731.zip |
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.
llvm-svn: 55281
-rw-r--r-- | clang/include/clang/Lex/Preprocessor.h | 20 | ||||
-rw-r--r-- | clang/lib/Lex/PPCaching.cpp | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index fe05b07eebe..cc056ead5d1 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -277,22 +277,22 @@ public: 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. diff --git a/clang/lib/Lex/PPCaching.cpp b/clang/lib/Lex/PPCaching.cpp index 5bed51eaa40..7ba5e45afab 100644 --- a/clang/lib/Lex/PPCaching.cpp +++ b/clang/lib/Lex/PPCaching.cpp @@ -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(); |