clang: clang::VisibleModuleSet Class Reference (original) (raw)
A set of visible modules. More...
#include "[clang/Basic/Module.h](Module%5F8h%5Fsource.html)"
Public Types | |
---|---|
using | VisibleCallback = llvm::function_ref< void(Module *M)> |
A callback to call when a module is made visible (directly or indirectly) by a call to setVisible. | |
using | ConflictCallback = llvm::function_ref< void(ArrayRef< Module * > Path, Module *Conflict, StringRef Message)> |
A callback to call when a module conflict is found. | |
Public Member Functions | |
---|---|
VisibleModuleSet ()=default | |
VisibleModuleSet (VisibleModuleSet &&O) | |
VisibleModuleSet & | operator= (VisibleModuleSet &&O) |
Move from another visible modules set. | |
unsigned | getGeneration () const |
Get the current visibility generation. | |
bool | isVisible (const Module *M) const |
Determine whether a module is visible. | |
SourceLocation | getImportLoc (const Module *M) const |
Get the location at which the import of a module was triggered. | |
void | setVisible (Module *M, SourceLocation Loc, VisibleCallback Vis=[](Module *) {}, ConflictCallback Cb=[](ArrayRef< Module * >, Module *, StringRef) {}) |
Make a specific module visible. | |
A set of visible modules.
Definition at line 837 of file Module.h.
◆ 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 879 of file Module.h.
◆ VisibleCallback
A callback to call when a module is made visible (directly or indirectly) by a call to setVisible.
Definition at line 874 of file Module.h.
clang::VisibleModuleSet::VisibleModuleSet ( ) | default |
---|
◆ VisibleModuleSet() [2/2]
◆ getGeneration()
unsigned clang::VisibleModuleSet::getGeneration ( ) const | inline |
---|
Get the current visibility generation.
Incremented each time the set of visible modules changes in any way.
Definition at line 858 of file Module.h.
◆ getImportLoc()
◆ isVisible()
bool clang::VisibleModuleSet::isVisible ( const Module * M) const | inline |
---|
◆ operator=()
Move from another visible modules set.
Guaranteed to leave the source empty and bump the generation on both.
Definition at line 848 of file Module.h.
◆ setVisible()
Make a specific module visible.
Definition at line 664 of file Module.cpp.
References clang::C, E, clang::Module::isGlobalModule(), clang::SourceLocation::isValid(), isVisible(), Loc, Path, and V.
Referenced by clang::Sema::ActOnAnnotModuleBegin(), clang::Sema::ActOnModuleDecl(), clang::Sema::ActOnModuleImport(), clang::Sema::ActOnPrivateModuleFragmentDecl(), clang::Sema::BuildModuleInclude(), clang::Sema::createImplicitModuleImportForErrorRecovery(), and makeTransitiveImportsVisible().
The documentation for this class was generated from the following files:
- include/clang/Basic/Module.h
- lib/Basic/Module.cpp