diff options
author | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
commit | 1eb4433ac451dc16f4133a88af2d002ac26c58ef (patch) | |
tree | 07065b80cb7787bb7b9ffcb985196007a57e86f7 /include/clang/Lex/PreprocessorLexer.h | |
parent | 79d39f92590cf2e91bf81486b02cd1156d13ca54 (diff) |
Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/PreprocessorLexer.h')
-rw-r--r-- | include/clang/Lex/PreprocessorLexer.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index 6a3c2bd43f..85c44c5a0b 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -29,19 +29,19 @@ protected: /// The SourceManager FileID corresponding to the file being lexed. const FileID FID; - + //===--------------------------------------------------------------------===// // Context-specific lexing flags set by the preprocessor. //===--------------------------------------------------------------------===// - + /// ParsingPreprocessorDirective - This is true when parsing #XXX. This turns /// '\n' into a tok::eom token. bool ParsingPreprocessorDirective; - + /// ParsingFilename - True after #include: this turns <xx> into a /// tok::angle_string_literal token. bool ParsingFilename; - + /// LexingRawMode - True if in raw mode: This flag disables interpretation of /// tokens and is a far faster mode to lex in than non-raw-mode. This flag: /// 1. If EOF of the current lexer is found, the include stack isn't popped. @@ -54,40 +54,40 @@ protected: /// /// Note that in raw mode that the PP pointer may be null. bool LexingRawMode; - - /// MIOpt - This is a state machine that detects the #ifndef-wrapping a file + + /// MIOpt - This is a state machine that detects the #ifndef-wrapping a file /// idiom for the multiple-include optimization. MultipleIncludeOpt MIOpt; - + /// ConditionalStack - Information about the set of #if/#ifdef/#ifndef blocks /// we are currently in. llvm::SmallVector<PPConditionalInfo, 4> ConditionalStack; - + PreprocessorLexer(const PreprocessorLexer&); // DO NOT IMPLEMENT 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() - : PP(0), + : PP(0), ParsingPreprocessorDirective(false), ParsingFilename(false), LexingRawMode(false) {} - + virtual ~PreprocessorLexer() {} - + virtual void IndirectLex(Token& Result) = 0; - + /// getSourceLocation - Return the source location for the next observable /// location. virtual SourceLocation getSourceLocation() = 0; - + //===--------------------------------------------------------------------===// // #if directive handling. - + /// pushConditionalLevel - When we enter a #if directive, this keeps track of /// what we are currently in for diagnostic emission (e.g. #if with missing /// #endif). @@ -102,8 +102,8 @@ protected: } void pushConditionalLevel(const PPConditionalInfo &CI) { ConditionalStack.push_back(CI); - } - + } + /// popConditionalLevel - Remove an entry off the top of the conditional /// stack, returning information about it. If the conditional stack is empty, /// this returns true and does not fill in the arguments. @@ -113,44 +113,44 @@ protected: ConditionalStack.pop_back(); return false; } - + /// peekConditionalLevel - Return the top of the conditional stack. This /// requires that there be a conditional active. PPConditionalInfo &peekConditionalLevel() { assert(!ConditionalStack.empty() && "No conditionals active!"); return ConditionalStack.back(); } - - unsigned getConditionalStackDepth() const { return ConditionalStack.size(); } + + unsigned getConditionalStackDepth() const { return ConditionalStack.size(); } public: - + //===--------------------------------------------------------------------===// // Misc. lexing methods. - + /// LexIncludeFilename - After the preprocessor has parsed a #include, lex and /// (potentially) macro expand the filename. If the sequence parsed is not /// lexically legal, emit a diagnostic and return a result EOM token. void LexIncludeFilename(Token &Result); - + /// setParsingPreprocessorDirective - Inform the lexer whether or not /// we are currently lexing a preprocessor directive. void setParsingPreprocessorDirective(bool f) { ParsingPreprocessorDirective = f; } - + /// isLexingRawMode - Return true if this lexer is in raw mode or not. bool isLexingRawMode() const { return LexingRawMode; } /// getPP - Return the preprocessor object for this lexer. Preprocessor *getPP() const { return PP; } - - FileID getFileID() const { + + FileID getFileID() const { assert(PP && "PreprocessorLexer::getFileID() should only be used with a Preprocessor"); return FID; } - + /// getFileEntry - Return the FileEntry corresponding to this FileID. Like /// getFileID(), this only works for lexers with attached preprocessors. const FileEntry *getFileEntry() const; |