diff options
Diffstat (limited to 'include/clang/Lex/PreprocessorLexer.h')
-rw-r--r-- | include/clang/Lex/PreprocessorLexer.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index 91e097e90e..e2e30bf878 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -30,6 +30,9 @@ protected: /// The SourceManager FileID corresponding to the file being lexed. const FileID FID; + /// \brief Number of SLocEntries before lexing the file. + unsigned InitialNumSLocEntries; + //===--------------------------------------------------------------------===// // Context-specific lexing flags set by the preprocessor. //===--------------------------------------------------------------------===// @@ -67,12 +70,10 @@ protected: void operator=(const PreprocessorLexer&); // DO NOT IMPLEMENT friend class Preprocessor; - PreprocessorLexer(Preprocessor *pp, FileID fid) - : PP(pp), FID(fid), ParsingPreprocessorDirective(false), - ParsingFilename(false), LexingRawMode(false) {} + PreprocessorLexer(Preprocessor *pp, FileID fid); PreprocessorLexer() - : PP(0), + : PP(0), InitialNumSLocEntries(0), ParsingPreprocessorDirective(false), ParsingFilename(false), LexingRawMode(false) {} @@ -151,6 +152,11 @@ public: return FID; } + /// \brief Number of SLocEntries before lexing the file. + unsigned getInitialNumSLocEntries() const { + return InitialNumSLocEntries; + } + /// getFileEntry - Return the FileEntry corresponding to this FileID. Like /// getFileID(), this only works for lexers with attached preprocessors. const FileEntry *getFileEntry() const; |