Go to the documentation of this file.
13 #ifndef LLVM_CLANG_LIB_CODEGEN_MACROPPCALLBACKS_H
14 #define LLVM_CLANG_LIB_CODEGEN_MACROPPCALLBACKS_H
38 int EnteredCommandLineIncludeFiles = 0;
40 enum FileScopeStatus {
44 CommandLineIncludeScope,
47 FileScopeStatus Status;
55 llvm::DIMacroFile *getCurrentScope();
74 raw_ostream &Name, raw_ostream &
Value);
77 void updateStatusToNextScope();
102 StringRef FileName,
bool IsAngled,
105 StringRef RelativePath,
const Module *Imported,
The primary public interface to the Clang code generator.
YAML serialization mapping.
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, OptionalFileEntryRef File, StringRef SearchPath, StringRef RelativePath, const Module *Imported, SrcMgr::CharacteristicKind FileType) override
Callback invoked whenever a directive (#xxx) is processed.
A description of the current definition of a macro.
Encodes a location in the source.
This interface provides a way to observe the actions of the preprocessor as it does its thing.
Encapsulates the data about a macro definition (e.g.
CharacteristicKind
Indicates whether a file or directory holds normal user code, system code, or system code which is im...
Token - This structure provides full information about a lexed token.
Describes a module or submodule.
void MacroDefined(const Token &MacroNameTok, const MacroDirective *MD) override
Hook called whenever a macro definition is seen.
Represents a character-granular source range.
void MacroUndefined(const Token &MacroNameTok, const MacroDefinition &MD, const MacroDirective *Undef) override
Hook called whenever a macro #undef is seen.
MacroPPCallbacks(CodeGenerator *Gen, Preprocessor &PP)
One of these records is kept for each identifier that is lexed.
Encapsulates changes to the "macros namespace" (the location where the macro name became active,...
void FileChanged(SourceLocation Loc, FileChangeReason Reason, SrcMgr::CharacteristicKind FileType, FileID PrevFID=FileID()) override
Callback invoked whenever a source file is entered or exited.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Engages in a tight little dance with the lexer to efficiently preprocess tokens.