class ModuleMacro
Declaration
class ModuleMacro : public Node { /* full declaration omitted */ };
Description
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.
Declared at: clang/include/clang/Lex/MacroInfo.h:512
Inherits from: FoldingSetBase::Node
Member Variables
- private clang::IdentifierInfo* II
- The name defined by the macro.
- private clang::MacroInfo* Macro
- The body of the #define, or nullptr if this is a #undef.
- private clang::Module* OwningModule
- The module that exports this macro.
- private unsigned int NumOverriddenBy = 0
- The number of module macros that override this one.
- private unsigned int NumOverrides
- The number of modules whose macros are directly overridden by this one.
Method Overview
- private ModuleMacro(clang::Module * OwningModule, clang::IdentifierInfo * II, clang::MacroInfo * Macro, ArrayRef<clang::ModuleMacro *> Overrides)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public static void Profile(llvm::FoldingSetNodeID & ID, clang::Module * OwningModule, const clang::IdentifierInfo * II)
- public static clang::ModuleMacro * create(clang::Preprocessor & PP, clang::Module * OwningModule, clang::IdentifierInfo * II, clang::MacroInfo * Macro, ArrayRef<clang::ModuleMacro *> Overrides)
- public clang::MacroInfo * getMacroInfo() const
- public clang::IdentifierInfo * getName() const
- public unsigned int getNumOverridingMacros() const
- public clang::Module * getOwningModule() const
- public ArrayRef<clang::ModuleMacro *> overrides() const
- public clang::ModuleMacro::overrides_iterator overrides_begin() const
- public clang::ModuleMacro::overrides_iterator overrides_end() const
Inherited from FoldingSetBase::Node:
Methods
¶ModuleMacro(
clang::Module* OwningModule,
clang::IdentifierInfo* II,
clang::MacroInfo* Macro,
ArrayRef<clang::ModuleMacro*> Overrides)
ModuleMacro(
clang::Module* OwningModule,
clang::IdentifierInfo* II,
clang::MacroInfo* Macro,
ArrayRef<clang::ModuleMacro*> Overrides)
Declared at: clang/include/clang/Lex/MacroInfo.h:530
Parameters
- clang::Module* OwningModule
- clang::IdentifierInfo* II
- clang::MacroInfo* Macro
- ArrayRef<clang::ModuleMacro*> Overrides
¶void Profile(llvm::FoldingSetNodeID& ID) const
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: clang/include/clang/Lex/MacroInfo.h:543
Parameters
¶static void Profile(
llvm::FoldingSetNodeID& ID,
clang::Module* OwningModule,
const clang::IdentifierInfo* II)
static void Profile(
llvm::FoldingSetNodeID& ID,
clang::Module* OwningModule,
const clang::IdentifierInfo* II)
Declared at: clang/include/clang/Lex/MacroInfo.h:547
Parameters
- llvm::FoldingSetNodeID& ID
- clang::Module* OwningModule
- const clang::IdentifierInfo* II
¶static clang::ModuleMacro* create(
clang::Preprocessor& PP,
clang::Module* OwningModule,
clang::IdentifierInfo* II,
clang::MacroInfo* Macro,
ArrayRef<clang::ModuleMacro*> Overrides)
static clang::ModuleMacro* create(
clang::Preprocessor& PP,
clang::Module* OwningModule,
clang::IdentifierInfo* II,
clang::MacroInfo* Macro,
ArrayRef<clang::ModuleMacro*> Overrides)
Declared at: clang/include/clang/Lex/MacroInfo.h:539
Parameters
- clang::Preprocessor& PP
- clang::Module* OwningModule
- clang::IdentifierInfo* II
- clang::MacroInfo* Macro
- ArrayRef<clang::ModuleMacro*> Overrides
¶clang::MacroInfo* getMacroInfo() const
clang::MacroInfo* getMacroInfo() const
Description
Get definition for this exported #define, or nullptr if this represents a #undef.
Declared at: clang/include/clang/Lex/MacroInfo.h:561
¶clang::IdentifierInfo* getName() const
clang::IdentifierInfo* getName() const
Description
Get the name of the macro.
Declared at: clang/include/clang/Lex/MacroInfo.h:554
¶unsigned int getNumOverridingMacros() const
unsigned int getNumOverridingMacros() const
Description
Get the number of macros that override this one.
Declared at: clang/include/clang/Lex/MacroInfo.h:581
¶clang::Module* getOwningModule() const
clang::Module* getOwningModule() const
Description
Get the ID of the module that exports this macro.
Declared at: clang/include/clang/Lex/MacroInfo.h:557
¶ArrayRef<clang::ModuleMacro*> overrides() const
ArrayRef<clang::ModuleMacro*> overrides() const
Declared at: clang/include/clang/Lex/MacroInfo.h:575
¶clang::ModuleMacro::overrides_iterator
overrides_begin() const
clang::ModuleMacro::overrides_iterator
overrides_begin() const
Declared at: clang/include/clang/Lex/MacroInfo.h:567
¶clang::ModuleMacro::overrides_iterator
overrides_end() const
clang::ModuleMacro::overrides_iterator
overrides_end() const
Declared at: clang/include/clang/Lex/MacroInfo.h:571