15 #ifndef LLVM_CLANG_LEX_MULTIPLEINCLUDEOPT_H
16 #define LLVM_CLANG_LEX_MULTIPLEINCLUDEOPT_H
40 bool ImmediatelyAfterTopLevelIfndef;
47 bool DidMacroExpansion;
60 ReadAnyTokens =
false;
61 ImmediatelyAfterTopLevelIfndef =
false;
62 DidMacroExpansion =
false;
64 DefinedMacro =
nullptr;
76 ImmediatelyAfterTopLevelIfndef =
false;
90 ImmediatelyAfterTopLevelIfndef =
false;
91 DefinedMacro =
nullptr;
103 return ImmediatelyAfterTopLevelIfndef;
108 ReadAnyTokens =
true;
109 ImmediatelyAfterTopLevelIfndef =
false;
132 if (DidMacroExpansion)
136 ReadAnyTokens =
true;
137 ImmediatelyAfterTopLevelIfndef =
true;
158 ReadAnyTokens =
false;
159 ImmediatelyAfterTopLevelIfndef =
false;
bool getHasReadAnyTokensVal() const
getHasReadAnyTokensVal - This is used for the #ifndef hande-shake at the top of the file when reading...
SourceLocation GetDefinedLocation() const
One of these records is kept for each identifier that is lexed.
bool getImmediatelyAfterTopLevelIfndef() const
getImmediatelyAfterTopLevelIfndef - returns true if the last directive was an #ifndef at the beginnin...
Implements the simple state machine that the Lexer class uses to detect files subject to the 'multipl...
void ExpandedMacro()
ExpandedMacro - When a macro is expanded with this lexer as the current buffer, this method is called...
void Invalidate()
Invalidate - Permanently mark this file as not being suitable for the include-file optimization...
void resetImmediatelyAfterTopLevelIfndef()
void SetDefinedMacro(IdentifierInfo *M, SourceLocation Loc)
Encodes a location in the source.
void ExitTopLevelConditional()
Called when the lexer exits the top-level conditional.
const IdentifierInfo * GetDefinedMacro() const
If the ControllingMacro is followed by a macro definition, return the macro that was defined...
void EnterTopLevelConditional()
Invoked when a top level conditional (except #ifndef) is found.
const IdentifierInfo * GetControllingMacroAtEndOfFile() const
Once the entire file has been lexed, if there is a controlling macro, return it.
Defines the clang::SourceLocation class and associated facilities.
void EnterTopLevelIfndef(const IdentifierInfo *M, SourceLocation Loc)
Called when entering a top-level #ifndef directive (or the "\#if !defined" equivalent) without any pr...
SourceLocation GetMacroLocation() const