14#ifndef LLVM_CLANG_LEX_MODULELOADER_H
15#define LLVM_CLANG_LEX_MODULELOADER_H
20#include "llvm/ADT/ArrayRef.h"
21#include "llvm/ADT/PointerIntPair.h"
22#include "llvm/ADT/StringRef.h"
27class GlobalModuleIndex;
49 llvm::PointerIntPair<Module *, 2, LoadResultKind>
Storage;
88 : BuildingModule(BuildingModule) {}
94 return BuildingModule;
99 BuildingModule = BuildingModuleFlag;
125 bool IsInclusionDirective) = 0;
135 StringRef Source) = 0;
170 bool IsInclusionDirective)
override {
175 StringRef Source)
override {}
enum clang::sema::@1656::IndirectLocalPathEntry::EntryKind Kind
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the clang::Module class, which describes a module in the source code.
Defines the clang::SourceLocation class and associated facilities.
A global index for a set of module files, providing information about the identifiers within those mo...
Describes the result of attempting to load a module.
bool isNormal() const
Determines whether this is a normal return, whether or not loading the module was successful.
ModuleLoadResult(Module *M)
ModuleLoadResult(LoadResultKind Kind)
bool isMissingExpected() const
Determines whether the module, which failed to load, was actually a submodule that we expected to see...
llvm::PointerIntPair< Module *, 2, LoadResultKind > Storage
bool isConfigMismatch() const
Determines whether the module failed to load due to a configuration mismatch with an explicitly-named...
ModuleLoadResult()=default
ModuleLoadResult(Module *M, LoadResultKind Kind)
Abstract interface for a module loader.
bool buildingModule() const
Returns true if this instance is building a module.
virtual GlobalModuleIndex * loadGlobalModuleIndex(SourceLocation TriggerLoc)=0
Load, create, or return global module.
virtual ModuleLoadResult loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective)=0
Attempt to load the given module.
virtual bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc)=0
Check global module index for missing imports.
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.
void setBuildingModule(bool BuildingModuleFlag)
Flag indicating whether this instance is building a module.
ModuleLoader(bool BuildingModule=false)
Describes a module or submodule.
NameVisibilityKind
Describes the visibility of the various names within a particular module.
Encodes a location in the source.
A module loader that doesn't know how to create or load modules.
ModuleLoadResult loadModule(SourceLocation ImportLoc, ModuleIdPath Path, Module::NameVisibilityKind Visibility, bool IsInclusionDirective) override
Attempt to load the given module.
bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
Check global module index for missing imports.
GlobalModuleIndex * loadGlobalModuleIndex(SourceLocation TriggerLoc) override
Load, create, or return global module.
void makeModuleVisible(Module *Mod, Module::NameVisibilityKind Visibility, SourceLocation ImportLoc) override
Make the given module visible.
void createModuleFromSource(SourceLocation ImportLoc, StringRef ModuleName, StringRef Source) override
Attempt to create the given module from the specified source buffer.
The JSON file list parser is used to communicate input to InstallAPI.
Visibility
Describes the different kinds of visibility that a declaration may have.