aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/MacroInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-14 22:11:41 +0000
committerChris Lattner <sabre@nondot.org>2007-07-14 22:11:41 +0000
commitc215bd659d8266a1d6b66ce231a63405a4c61daf (patch)
tree8691ff644071b1d3baf76493d963075719d8dab4 /include/clang/Lex/MacroInfo.h
parentb5e240fa9e852b758032b28488a083c546cf6123 (diff)
expose an iterator interface to getReplacementTokens instead of the datastructure itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/MacroInfo.h')
-rw-r--r--include/clang/Lex/MacroInfo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Lex/MacroInfo.h b/include/clang/Lex/MacroInfo.h
index ea1a06d33e..b7495bf548 100644
--- a/include/clang/Lex/MacroInfo.h
+++ b/include/clang/Lex/MacroInfo.h
@@ -157,10 +157,10 @@ public:
return ReplacementTokens[Tok];
}
- const std::vector<LexerToken> &getReplacementTokens() const {
- return ReplacementTokens;
- }
-
+ typedef std::vector<LexerToken>::const_iterator tokens_iterator;
+ tokens_iterator tokens_begin() const { return ReplacementTokens.begin(); }
+ tokens_iterator tokens_end() const { return ReplacementTokens.end(); }
+
/// AddTokenToBody - Add the specified token to the replacement text for the
/// macro.
void AddTokenToBody(const LexerToken &Tok) {