|
clang-tools 23.0.0git
|
An interface to query the modules information in the project. More...
#include <ProjectModules.h>
Public Types | |
| enum class | ModuleNameState { Unknown , Unique , Multiple } |
| using | CommandMangler |
Public Member Functions | |
| virtual std::vector< std::string > | getRequiredModules (PathRef File)=0 |
| virtual std::string | getModuleNameForSource (PathRef File)=0 |
| virtual std::string | getSourceForModuleName (llvm::StringRef ModuleName, PathRef RequiredSrcFile)=0 |
| virtual ModuleNameState | getModuleNameState (llvm::StringRef ModuleName) |
| virtual void | setCommandMangler (CommandMangler Mangler) |
| virtual | ~ProjectModules ()=default |
An interface to query the modules information in the project.
Users should get instances of ProjectModules from GlobalCompilationDatabase::getProjectModules(PathRef).
Currently, the modules information includes:
Note that there can be multiple source files declaring the same module in a valid project. Although the language specification requires that every module unit's name must be unique in valid program, there can be multiple program in a project. And it is technically valid if these program doesn't interfere with each other.
A module name should be in the format: <primary-module-name>[:partition-name]. So module names covers partitions.
Definition at line 39 of file ProjectModules.h.
Definition at line 47 of file ProjectModules.h.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| Unique | |
| Multiple | |
Definition at line 41 of file ProjectModules.h.
|
virtualdefault |
|
pure virtual |
Implemented in clang::clangd::CompileCommandsProjectModules, clang::clangd::CompoundProjectModules, and clang::clangd::ScanningAllProjectModules.
References clang::clangd::File.
|
inlinevirtual |
Reimplemented in clang::clangd::CompileCommandsProjectModules, clang::clangd::CompoundProjectModules, and clang::clangd::ScanningAllProjectModules.
Definition at line 54 of file ProjectModules.h.
References Unknown.
|
pure virtual |
Implemented in clang::clangd::CompileCommandsProjectModules, clang::clangd::CompoundProjectModules, and clang::clangd::ScanningAllProjectModules.
References clang::clangd::File.
|
pure virtual |
|
inlinevirtual |
Reimplemented in clang::clangd::CompileCommandsProjectModules, clang::clangd::CompoundProjectModules, and clang::clangd::ScanningAllProjectModules.
Definition at line 58 of file ProjectModules.h.