clang
3.7.0
|
A set of visible modules. More...
#include <Module.h>
Public Types | |
typedef llvm::function_ref < void(Module *M)> | VisibleCallback |
A callback to call when a module is made visible (directly or indirectly) by a call to setVisible. More... | |
typedef llvm::function_ref < void(ArrayRef< Module * > Path, Module *Conflict, StringRef Message)> | ConflictCallback |
A callback to call when a module conflict is found. Path consists of a sequence of modules from the conflicting module to the one made visible, where each was exported by the next. More... | |
Public Member Functions | |
VisibleModuleSet () | |
VisibleModuleSet (VisibleModuleSet &&O) | |
VisibleModuleSet & | operator= (VisibleModuleSet &&O) |
unsigned | getGeneration () const |
Get the current visibility generation. Incremented each time the set of visible modules changes in any way. More... | |
bool | isVisible (const Module *M) const |
Determine whether a module is visible. More... | |
SourceLocation | getImportLoc (const Module *M) const |
Get the location at which the import of a module was triggered. More... | |
void | setVisible (Module *M, SourceLocation Loc, VisibleCallback Vis=[](Module *){}, ConflictCallback Cb=[](ArrayRef< Module * >, Module *, StringRef){}) |
Make a specific module visible. More... | |
A set of visible modules.
Definition at line 494 of file Basic/Module.h.
typedef llvm::function_ref<void(ArrayRef<Module *> Path, Module *Conflict, StringRef Message)> clang::VisibleModuleSet::ConflictCallback |
A callback to call when a module conflict is found. Path
consists of a sequence of modules from the conflicting module to the one made visible, where each was exported by the next.
Definition at line 537 of file Basic/Module.h.
typedef llvm::function_ref<void(Module *M)> clang::VisibleModuleSet::VisibleCallback |
A callback to call when a module is made visible (directly or indirectly) by a call to setVisible.
Definition at line 531 of file Basic/Module.h.
|
inline |
Definition at line 496 of file Basic/Module.h.
|
inline |
Definition at line 497 of file Basic/Module.h.
|
inline |
Get the current visibility generation. Incremented each time the set of visible modules changes in any way.
Definition at line 515 of file Basic/Module.h.
|
inline |
Get the location at which the import of a module was triggered.
Definition at line 523 of file Basic/Module.h.
References clang::Module::getVisibilityID().
Referenced by isVisible().
Determine whether a module is visible.
Definition at line 518 of file Basic/Module.h.
References getImportLoc(), and clang::SourceLocation::isValid().
|
inline |
Move from another visible modules set. Guaranteed to leave the source empty and bump the generation on both.
Definition at line 505 of file Basic/Module.h.
void VisibleModuleSet::setVisible | ( | Module * | M, |
SourceLocation | Loc, | ||
VisibleCallback | Vis = [](Module *) {} , |
||
ConflictCallback | Cb = [](ArrayRef<Module *>, Module *, StringRef) {} |
||
) |
Make a specific module visible.
Definition at line 483 of file Basic/Module.cpp.
References AttributeLangSupport::C, and clang::Module::Exports.
Referenced by clang::Sema::ActOnModuleBegin(), clang::Sema::ActOnModuleEnd(), clang::Sema::ActOnModuleImport(), clang::Sema::ActOnModuleInclude(), and clang::Sema::createImplicitModuleImportForErrorRecovery().