implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310

llvm-svn: 68933
This commit is contained in:
Chris Lattner
2009-04-13 01:29:17 +00:00
parent 0d6c061401
commit 0af3ba1748
10 changed files with 63 additions and 8 deletions

View File

@@ -53,7 +53,8 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
SourceMgr(SM), HeaderInfo(Headers), Identifiers(opts, IILookup),
CurPPLexer(0), CurDirLookup(0), Callbacks(0) {
ScratchBuf = new ScratchBuffer(SourceMgr);
CounterValue = 0; // __COUNTER__ starts at 0.
// Clear stats.
NumDirectives = NumDefined = NumUndefined = NumPragma = 0;
NumIf = NumElse = NumEndif = 0;