aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-13 01:29:17 +0000
committerChris Lattner <sabre@nondot.org>2009-04-13 01:29:17 +0000
commitc1f9d828c733ec1eba06d01070735d1f36fda733 (patch)
tree48615af3823ebc732c7f63a75b4177c3ba02ece7 /include/clang/Lex/Preprocessor.h
parent1721a2dfc05d081e76d6dd4755d52c96e093dabc (diff)
implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 47f40b68f6..9e4278515b 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -67,9 +67,11 @@ class Preprocessor {
IdentifierInfo *Ident__INCLUDE_LEVEL__; // __INCLUDE_LEVEL__
IdentifierInfo *Ident__BASE_FILE__; // __BASE_FILE__
IdentifierInfo *Ident__TIMESTAMP__; // __TIMESTAMP__
+ IdentifierInfo *Ident__COUNTER__; // __COUNTER__
IdentifierInfo *Ident_Pragma, *Ident__VA_ARGS__; // _Pragma, __VA_ARGS__
SourceLocation DATELoc, TIMELoc;
+ unsigned CounterValue; // Next __COUNTER__ value.
enum {
/// MaxIncludeStackDepth - Maximum depth of #includes.
@@ -590,6 +592,8 @@ public:
bool SawDateOrTime() const {
return DATELoc != SourceLocation() || TIMELoc != SourceLocation();
}
+ unsigned getCounterValue() const { return CounterValue; }
+ void setCounterValue(unsigned V) { CounterValue = V; }
/// AllocateMacroInfo - Allocate a new MacroInfo object with the provide
/// SourceLocation.