clang 20.0.0git
|
Represents a macro directive exported by a module. More...
#include "clang/Lex/MacroInfo.h"
Public Member Functions | |
void | Profile (llvm::FoldingSetNodeID &ID) const |
const IdentifierInfo * | getName () const |
Get the name of the macro. | |
Module * | getOwningModule () const |
Get the ID of the module that exports this macro. | |
MacroInfo * | getMacroInfo () const |
Get definition for this exported #define, or nullptr if this represents a #undef. | |
unsigned | getNumOverridingMacros () const |
Get the number of macros that override this one. | |
Static Public Member Functions | |
static ModuleMacro * | create (Preprocessor &PP, Module *OwningModule, const IdentifierInfo *II, MacroInfo *Macro, ArrayRef< ModuleMacro * > Overrides) |
static void | Profile (llvm::FoldingSetNodeID &ID, Module *OwningModule, const IdentifierInfo *II) |
Friends | |
class | Preprocessor |
using | overrides_iterator = ModuleMacro *const * |
Iterators over the overridden module IDs. | |
overrides_iterator | overrides_begin () const |
overrides_iterator | overrides_end () const |
ArrayRef< ModuleMacro * > | overrides () const |
Represents a macro directive exported by a module.
There's an instance of this class for every macro #define or #undef that is the final directive for a macro name within a module. These entities also represent the macro override graph.
These are stored in a FoldingSet in the preprocessor.
Definition at line 514 of file MacroInfo.h.
using clang::ModuleMacro::overrides_iterator = ModuleMacro *const * |
Iterators over the overridden module IDs.
Definition at line 567 of file MacroInfo.h.
|
static |
Definition at line 257 of file MacroInfo.cpp.
References clang::Preprocessor::getPreprocessorAllocator().
Referenced by clang::Preprocessor::addModuleMacro().
|
inline |
Get definition for this exported #define, or nullptr if this represents a #undef.
Definition at line 563 of file MacroInfo.h.
|
inline |
Get the name of the macro.
Definition at line 556 of file MacroInfo.h.
|
inline |
Get the number of macros that override this one.
Definition at line 583 of file MacroInfo.h.
|
inline |
Get the ID of the module that exports this macro.
Definition at line 559 of file MacroInfo.h.
|
inline |
Definition at line 577 of file MacroInfo.h.
|
inline |
Definition at line 569 of file MacroInfo.h.
|
inline |
Definition at line 573 of file MacroInfo.h.
|
inline |
Definition at line 545 of file MacroInfo.h.
References ID.
Referenced by clang::Preprocessor::addModuleMacro(), and clang::Preprocessor::getModuleMacro().
|
inlinestatic |
Definition at line 549 of file MacroInfo.h.
References ID.
|
friend |
Definition at line 515 of file MacroInfo.h.