summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-06 06:26:42 +0000
committerChris Lattner <sabre@nondot.org>2009-02-06 06:26:42 +0000
commit5c7cd6043efa3ea4fca87fd316d086c1c205638b (patch)
treea93b9a1b6973c481c774282fd0c9d7760a2e2589 /clang/include
parentf302000e5c0ead1b1c142d803091cd54d09b32ea (diff)
downloadbcm5719-llvm-5c7cd6043efa3ea4fca87fd316d086c1c205638b.tar.gz
bcm5719-llvm-5c7cd6043efa3ea4fca87fd316d086c1c205638b.zip
add interface for walking macro table.
llvm-svn: 63925
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Lex/Preprocessor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index 4e57069385d..94a7ef45b39 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -247,6 +247,15 @@ public:
///
void setMacroInfo(IdentifierInfo *II, MacroInfo *MI);
+ /// macro_iterator/macro_begin/macro_end - This allows you to walk the current
+ /// state of the macro table. This visits every currently-defined macro.
+ typedef llvm::DenseMap<IdentifierInfo*,
+ MacroInfo*>::const_iterator macro_iterator;
+ macro_iterator macro_begin() const { return Macros.begin(); }
+ macro_iterator macro_end() const { return Macros.end(); }
+
+
+
const std::string &getPredefines() const { return Predefines; }
/// setPredefines - Set the predefines for this Preprocessor. These
/// predefines are automatically injected when parsing the main file.
OpenPOWER on IntegriCloud