clang 22.0.0git
|
A set of visible modules. More...
#include "clang/Basic/Module.h"
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 |
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, bool IncludeExports=true, VisibleCallback Vis=[](Module *) {}, ConflictCallback Cb=[](ArrayRef< Module * >, Module *, StringRef) {}) |
Make a specific module visible. |
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.
using clang::VisibleModuleSet::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.
|
default |
Referenced by operator=(), and VisibleModuleSet().
|
inline |
Definition at line 869 of file Module.h.
References VisibleModuleSet().
|
inline |
|
inline |
Get the location at which the import of a module was triggered.
Definition at line 895 of file Module.h.
References clang::Module::getVisibilityID().
Referenced by isVisible().
Determine whether a module is visible.
Definition at line 890 of file Module.h.
References getImportLoc(), and clang::SourceLocation::isValid().
Referenced by setVisible().
|
inline |
Move from another visible modules set.
Guaranteed to leave the source empty and bump the generation on both.
Definition at line 877 of file Module.h.
References VisibleModuleSet().
void VisibleModuleSet::setVisible | ( | Module * | M, |
SourceLocation | Loc, | ||
bool | IncludeExports = true, | ||
VisibleCallback | Vis = [](Module *) {}, | ||
ConflictCallback | Cb = [](ArrayRef<Module *>, Module *, StringRef) {} ) |
Make a specific module visible.
Definition at line 662 of file Module.cpp.
References clang::C, std::function, clang::Module::isGlobalModule(), clang::SourceLocation::isValid(), isVisible(), and V.
Referenced by makeTransitiveImportsVisible().