class TrivialModuleLoader
Declaration
class TrivialModuleLoader : public ModuleLoader { /* full declaration omitted */ };
Description
A module loader that doesn't know how to create or load modules.
Declared at: clang/include/clang/Lex/ModuleLoader.h:161
Inherits from: ModuleLoader
Member Variables
Inherited from ModuleLoader:
- public HadFatalFailure = false
Method Overview
- public void createModuleFromSource(clang::SourceLocation ImportLoc, llvm::StringRef ModuleName, llvm::StringRef Source)
- public clang::GlobalModuleIndex * loadGlobalModuleIndex(clang::SourceLocation TriggerLoc)
- public clang::ModuleLoadResult loadModule(clang::SourceLocation ImportLoc, clang::ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective)
- public bool lookupMissingImports(llvm::StringRef Name, clang::SourceLocation TriggerLoc)
- public void makeModuleVisible(clang::Module * Mod, Module::NameVisibilityKind Visibility, clang::SourceLocation ImportLoc)
Inherited from ModuleLoader:
- public buildingModule
- public createModuleFromSource
- public loadGlobalModuleIndex
- public loadModule
- public lookupMissingImports
- public makeModuleVisible
- public setBuildingModule
Methods
¶void createModuleFromSource(
clang::SourceLocation ImportLoc,
llvm::StringRef ModuleName,
llvm::StringRef Source)
void createModuleFromSource(
clang::SourceLocation ImportLoc,
llvm::StringRef ModuleName,
llvm::StringRef Source)
Description
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.
Declared at: clang/include/clang/Lex/ModuleLoader.h:169
Parameters
- clang::SourceLocation ImportLoc
- llvm::StringRef ModuleName
- The name of the module to create.
- llvm::StringRef Source
- The source of the module: a (preprocessed) module map.
¶clang::GlobalModuleIndex* loadGlobalModuleIndex(
clang::SourceLocation TriggerLoc)
clang::GlobalModuleIndex* loadGlobalModuleIndex(
clang::SourceLocation TriggerLoc)
Description
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.
Declared at: clang/include/clang/Lex/ModuleLoader.h:175
Parameters
- clang::SourceLocation TriggerLoc
- The location for what triggered the load.
Returns
Returns null if load failed.
¶clang::ModuleLoadResult loadModule(
clang::SourceLocation ImportLoc,
clang::ModuleIdPath Path,
Module::NameVisibilityKind Visibility,
bool IsInclusionDirective)
clang::ModuleLoadResult loadModule(
clang::SourceLocation ImportLoc,
clang::ModuleIdPath Path,
Module::NameVisibilityKind Visibility,
bool IsInclusionDirective)
Description
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.
Declared at: clang/include/clang/Lex/ModuleLoader.h:163
Parameters
- clang::SourceLocation ImportLoc
- The location of the 'import' keyword.
- clang::ModuleIdPath Path
- The identifiers (and their locations) of the module "path", e.g., "std.vector" would be split into "std" and "vector".
- Module::NameVisibilityKind Visibility
- The visibility provided for the names in the loaded module.
- bool 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.
Returns
If successful, returns the loaded module. Otherwise, returns NULL to indicate that the module could not be loaded.
¶bool lookupMissingImports(
llvm::StringRef Name,
clang::SourceLocation TriggerLoc)
bool lookupMissingImports(
llvm::StringRef Name,
clang::SourceLocation TriggerLoc)
Description
Check global module index for missing imports.
Declared at: clang/include/clang/Lex/ModuleLoader.h:179
Parameters
- llvm::StringRef Name
- The symbol name to look for.
- clang::SourceLocation TriggerLoc
- The location for what triggered the load.
Returns
Returns true if any modules with that symbol found.
¶void makeModuleVisible(
clang::Module* Mod,
Module::NameVisibilityKind Visibility,
clang::SourceLocation ImportLoc)
void makeModuleVisible(
clang::Module* Mod,
Module::NameVisibilityKind Visibility,
clang::SourceLocation ImportLoc)
Description
Make the given module visible.
Declared at: clang/include/clang/Lex/ModuleLoader.h:172
Parameters
- clang::Module* Mod
- Module::NameVisibilityKind Visibility
- clang::SourceLocation ImportLoc