clang 20.0.0git
|
A module loader that doesn't know how to create or load modules. More...
#include "clang/Lex/ModuleLoader.h"
Public Member Functions | |
ModuleLoadResult | loadModule (SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) override |
Attempt to load the given module. | |
void | createModuleFromSource (SourceLocation ImportLoc, StringRef ModuleName, StringRef Source) override |
Attempt to create the given module from the specified source buffer. | |
void | makeModuleVisible (Module *Mod, Module::NameVisibilityKind Visibility, SourceLocation ImportLoc) override |
Make the given module visible. | |
GlobalModuleIndex * | loadGlobalModuleIndex (SourceLocation TriggerLoc) override |
Load, create, or return global module. | |
bool | lookupMissingImports (StringRef Name, SourceLocation TriggerLoc) override |
Check global module index for missing imports. | |
Public Member Functions inherited from clang::ModuleLoader | |
ModuleLoader (bool BuildingModule=false) | |
virtual | ~ModuleLoader () |
bool | buildingModule () const |
Returns true if this instance is building a module. | |
void | setBuildingModule (bool BuildingModuleFlag) |
Flag indicating whether this instance is building a module. | |
virtual ModuleLoadResult | loadModule (SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective)=0 |
Attempt to load the given module. | |
virtual void | createModuleFromSource (SourceLocation Loc, StringRef ModuleName, StringRef Source)=0 |
Attempt to create the given module from the specified source buffer. | |
virtual void | makeModuleVisible (Module *Mod, Module::NameVisibilityKind Visibility, SourceLocation ImportLoc)=0 |
Make the given module visible. | |
virtual GlobalModuleIndex * | loadGlobalModuleIndex (SourceLocation TriggerLoc)=0 |
Load, create, or return global module. | |
virtual bool | lookupMissingImports (StringRef Name, SourceLocation TriggerLoc)=0 |
Check global module index for missing imports. | |
Additional Inherited Members | |
Public Attributes inherited from clang::ModuleLoader | |
bool | HadFatalFailure = false |
A module loader that doesn't know how to create or load modules.
Definition at line 166 of file ModuleLoader.h.
|
inlineoverridevirtual |
Attempt to create the given module from the specified source buffer.
Does not load the module or make any submodule visible; for that, use loadModule and makeModuleVisible.
Loc | The location at which to create the module. |
ModuleName | The name of the module to create. |
Source | The source of the module: a (preprocessed) module map. |
Implements clang::ModuleLoader.
Definition at line 174 of file ModuleLoader.h.
|
inlineoverridevirtual |
Load, create, or return global module.
This function returns an existing global module index, if one had already been loaded or created, or loads one if it exists, or creates one if it doesn't exist. Also, importantly, if the index doesn't cover all the modules in the module map, it will be update to do so here, because of its use in searching for needed module imports and associated fixit messages.
TriggerLoc | The location for what triggered the load. |
Implements clang::ModuleLoader.
Definition at line 180 of file ModuleLoader.h.
|
inlineoverridevirtual |
Attempt to load the given module.
This routine attempts to load the module described by the given parameters. If there is a module cache, this may implicitly compile the module before loading it.
ImportLoc | The location of the 'import' keyword. |
Path | The identifiers (and their locations) of the module "path", e.g., "std.vector" would be split into "std" and "vector". |
Visibility | The visibility provided for the names in the loaded module. |
IsInclusionDirective | Indicates that this module is being loaded implicitly, due to the presence of an inclusion directive. Otherwise, it is being loaded due to an import declaration. |
Implements clang::ModuleLoader.
Definition at line 168 of file ModuleLoader.h.
|
inlineoverridevirtual |
Check global module index for missing imports.
Name | The symbol name to look for. |
TriggerLoc | The location for what triggered the load. |
Implements clang::ModuleLoader.
Definition at line 184 of file ModuleLoader.h.
|
inlineoverridevirtual |
Make the given module visible.
Implements clang::ModuleLoader.
Definition at line 177 of file ModuleLoader.h.