clang  3.9.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::ModuleMacro Class Reference

Represents a macro directive exported by a module. More...

#include <MacroInfo.h>

Inheritance diagram for clang::ModuleMacro:
[legend]
Collaboration diagram for clang::ModuleMacro:
[legend]

Public Member Functions

void Profile (llvm::FoldingSetNodeID &ID) const
 
ModulegetOwningModule () const
 Get the ID of the module that exports this macro. More...
 
MacroInfogetMacroInfo () const
 Get definition for this exported #define, or nullptr if this represents a #undef. More...
 
unsigned getNumOverridingMacros () const
 Get the number of macros that override this one. More...
 

Static Public Member Functions

static ModuleMacrocreate (Preprocessor &PP, Module *OwningModule, IdentifierInfo *II, MacroInfo *Macro, ArrayRef< ModuleMacro * > Overrides)
 
static void Profile (llvm::FoldingSetNodeID &ID, Module *OwningModule, IdentifierInfo *II)
 

Friends

class Preprocessor
 
typedef ModuleMacro *const * overrides_iterator
 Iterators over the overridden module IDs. More...
 
overrides_iterator overrides_begin () const
 
overrides_iterator overrides_end () const
 
ArrayRef< ModuleMacro * > overrides () const
 

Detailed 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.

Definition at line 497 of file MacroInfo.h.

Member Typedef Documentation

Iterators over the overridden module IDs.

Definition at line 543 of file MacroInfo.h.

Member Function Documentation

ModuleMacro * ModuleMacro::create ( Preprocessor PP,
Module OwningModule,
IdentifierInfo II,
MacroInfo Macro,
ArrayRef< ModuleMacro * >  Overrides 
)
static
MacroInfo* clang::ModuleMacro::getMacroInfo ( ) const
inline

Get definition for this exported #define, or nullptr if this represents a #undef.

Definition at line 539 of file MacroInfo.h.

unsigned clang::ModuleMacro::getNumOverridingMacros ( ) const
inline

Get the number of macros that override this one.

Definition at line 556 of file MacroInfo.h.

Module* clang::ModuleMacro::getOwningModule ( ) const
inline

Get the ID of the module that exports this macro.

Definition at line 535 of file MacroInfo.h.

ArrayRef<ModuleMacro *> clang::ModuleMacro::overrides ( ) const
inline

Definition at line 550 of file MacroInfo.h.

overrides_iterator clang::ModuleMacro::overrides_begin ( ) const
inline

Definition at line 544 of file MacroInfo.h.

overrides_iterator clang::ModuleMacro::overrides_end ( ) const
inline

Definition at line 547 of file MacroInfo.h.

void clang::ModuleMacro::Profile ( llvm::FoldingSetNodeID &  ID) const
inline
static void clang::ModuleMacro::Profile ( llvm::FoldingSetNodeID &  ID,
Module OwningModule,
IdentifierInfo II 
)
inlinestatic

Definition at line 528 of file MacroInfo.h.

Friends And Related Function Documentation

friend class Preprocessor
friend

Definition at line 510 of file MacroInfo.h.


The documentation for this class was generated from the following files: