clang
3.9.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. More... | |
Public Member Functions | |
VisibleModuleSet () | |
VisibleModuleSet (VisibleModuleSet &&O) | |
VisibleModuleSet & | operator= (VisibleModuleSet &&O) |
Move from another visible modules set. More... | |
unsigned | getGeneration () const |
Get the current visibility generation. 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 508 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 551 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 545 of file Basic/Module.h.
|
inline |
Definition at line 510 of file Basic/Module.h.
|
inline |
Definition at line 511 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 529 of file Basic/Module.h.
|
inline |
Get the location at which the import of a module was triggered.
Definition at line 537 of file Basic/Module.h.
References clang::Module::getVisibilityID().
Referenced by isVisible().
Determine whether a module is visible.
Definition at line 532 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 519 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 489 of file Basic/Module.cpp.
References E, clang::Module::Exports, I, ID, and clang::SourceLocation::isValid().
Referenced by clang::Sema::ActOnModuleBegin(), clang::Sema::ActOnModuleEnd(), clang::Sema::ActOnModuleImport(), clang::Sema::ActOnModuleInclude(), and clang::Sema::createImplicitModuleImportForErrorRecovery().