clang 20.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 = 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. | |
using clang::VisibleModuleSet::ConflictCallback = llvm::function_ref<void(ArrayRef<Module *> Path, Module *Conflict, StringRef Message)> |
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 |
|
inline |
|
inline |
|
inline |
Get the location at which the import of a module was triggered.
Definition at line 840 of file Module.h.
References clang::Module::getVisibilityID().
Referenced by clang::Sema::ActOnModuleDecl(), and isVisible().
Determine whether a module is visible.
Definition at line 835 of file Module.h.
References getImportLoc(), and clang::SourceLocation::isValid().
Referenced by clang::Sema::createImplicitModuleImportForErrorRecovery(), clang::Sema::isModuleVisible(), makeTransitiveImportsVisible(), and setVisible().
|
inline |
void VisibleModuleSet::setVisible | ( | Module * | M, |
SourceLocation | Loc, | ||
VisibleCallback | Vis = [](Module *) {} , |
||
ConflictCallback | Cb = [](ArrayRef<Module *>, Module *, StringRef) {} |
||
) |
Make a specific module visible.
Definition at line 681 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().