clang  3.7.0
Public Types | Public Member Functions | List of all members
clang::VisibleModuleSet Class Reference

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)
 
VisibleModuleSetoperator= (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...
 

Detailed Description

A set of visible modules.

Definition at line 494 of file Basic/Module.h.

Member Typedef Documentation

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.

Constructor & Destructor Documentation

clang::VisibleModuleSet::VisibleModuleSet ( )
inline

Definition at line 496 of file Basic/Module.h.

clang::VisibleModuleSet::VisibleModuleSet ( VisibleModuleSet &&  O)
inline

Definition at line 497 of file Basic/Module.h.

Member Function Documentation

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 515 of file Basic/Module.h.

SourceLocation clang::VisibleModuleSet::getImportLoc ( const Module M) const
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().

bool clang::VisibleModuleSet::isVisible ( const Module M) const
inline

Determine whether a module is visible.

Definition at line 518 of file Basic/Module.h.

References getImportLoc(), and clang::SourceLocation::isValid().

VisibleModuleSet& clang::VisibleModuleSet::operator= ( VisibleModuleSet &&  O)
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) {} 
)

The documentation for this class was generated from the following files: