clang API Documentation

Public Member Functions
clang::ModuleLoader Class Reference

Abstract interface for a module loader. More...

#include <ModuleLoader.h>

Inheritance diagram for clang::ModuleLoader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~ModuleLoader ()
virtual ModuleloadModule (SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective)=0
 Attempt to load the given module.

Detailed Description

Abstract interface for a module loader.

This abstract interface describes a module loader, which is responsible for resolving a module name (e.g., "std") to an actual module file, and then loading that module.

Definition at line 35 of file ModuleLoader.h.


Constructor & Destructor Documentation

ModuleLoader::~ModuleLoader ( ) [virtual]

Definition at line 653 of file Preprocessor.cpp.


Member Function Documentation

virtual Module* clang::ModuleLoader::loadModule ( SourceLocation  ImportLoc,
ModuleIdPath  Path,
Module::NameVisibilityKind  Visibility,
bool  IsInclusionDirective 
) [pure virtual]

Attempt to load the given module.

This routine attempts to load the module described by the given parameters.

Parameters:
ImportLocThe location of the 'import' keyword.
PathThe identifiers (and their locations) of the module "path", e.g., "std.vector" would be split into "std" and "vector".
VisibilityThe visibility provided for the names in the loaded module.
IsInclusionDirectiveIndicates 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.

Implemented in clang::ASTUnit, and clang::CompilerInstance.

Referenced by clang::Sema::ActOnModuleImport(), and clang::Preprocessor::LexAfterModuleImport().


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