|
clang 23.0.0git
|
This file defines functionality to support driver managed builds for compilations which use Clang modules or standard C++20 named modules. More...
#include "clang/Driver/ModulesDriver.h"#include "clang/Basic/Diagnostic.h"#include "clang/Basic/LLVM.h"#include "clang/Driver/Compilation.h"#include "clang/Driver/Driver.h"#include "clang/Driver/Job.h"#include "clang/Driver/Tool.h"#include "clang/Driver/ToolChain.h"#include "llvm/Support/JSON.h"#include "llvm/Support/Path.h"#include "llvm/Support/PrettyStackTrace.h"#include "llvm/Support/VirtualFileSystem.h"Go to the source code of this file.
Namespaces | |
| namespace | clang |
| The JSON file list parser is used to communicate input to InstallAPI. | |
| namespace | clang::driver |
| namespace | clang::driver::modules |
Typedefs | |
| using | ManifestEntryLookup |
Functions | |
| static bool | clang::driver::modules::fromJSON (const llvm::json::Value &Params, StdModuleManifest::Module::LocalArguments &LocalArgs, llvm::json::Path P) |
| static bool | clang::driver::modules::fromJSON (const llvm::json::Value &Params, StdModuleManifest::Module &ModuleEntry, llvm::json::Path P) |
| static bool | clang::driver::modules::fromJSON (const llvm::json::Value &Params, StdModuleManifest &Manifest, llvm::json::Path P) |
| static Expected< StdModuleManifest > | parseManifest (StringRef Buffer) |
Parses the Standard library module manifest from Buffer. | |
| static void | makeManifestPathsAbsolute (MutableArrayRef< StdModuleManifest::Module > ManifestEntries, StringRef ManifestPath) |
| Converts each file path in manifest from relative to absolute. | |
| static ManifestEntryLookup | buildManifestLookupMap (ArrayRef< StdModuleManifest::Module > ManifestEntries) |
| Builds a mapping from a module's source path to its entry in the manifest. | |
| static const StdModuleManifest::Module * | getManifestEntryForCommand (const Command &Job, const ManifestEntryLookup &ManifestEntryBySource) |
Returns the manifest entry corresponding to Job, or nullptr if none exists. | |
| static void | addSystemIncludeDirsFromManifest (Compilation &C, Command &Job, ArgStringList &CC1Args, ArrayRef< std::string > SystemIncludeDirs) |
Adds all SystemIncludeDirs to the CC1Args of Job. | |
| static bool | isCC1Job (const Command &Job) |
| static void | applyArgsForStdModuleManifestInputs (Compilation &C, const ManifestEntryLookup &ManifestEntryBySource, MutableArrayRef< std::unique_ptr< Command > > Jobs) |
| Apply command-line modifications specific for inputs originating from the Standard library module manifest. | |
This file defines functionality to support driver managed builds for compilations which use Clang modules or standard C++20 named modules.
Definition in file ModulesDriver.cpp.
| using ManifestEntryLookup |
Definition at line 127 of file ModulesDriver.cpp.
|
static |
Adds all SystemIncludeDirs to the CC1Args of Job.
Definition at line 158 of file ModulesDriver.cpp.
References clang::driver::ToolChain::addSystemInclude(), clang::C, clang::driver::Command::getCreator(), clang::driver::Action::getOffloadingArch(), clang::driver::Action::getOffloadingDeviceKind(), clang::driver::Command::getSource(), and clang::driver::Tool::getToolChain().
Referenced by applyArgsForStdModuleManifestInputs().
|
static |
Apply command-line modifications specific for inputs originating from the Standard library module manifest.
Definition at line 176 of file ModulesDriver.cpp.
References addSystemIncludeDirsFromManifest(), clang::C, getManifestEntryForCommand(), and isCC1Job().
Referenced by clang::driver::modules::runModulesDriver().
|
static |
Builds a mapping from a module's source path to its entry in the manifest.
Definition at line 132 of file ModulesDriver.cpp.
Referenced by clang::driver::modules::runModulesDriver().
|
static |
Returns the manifest entry corresponding to Job, or nullptr if none exists.
Definition at line 146 of file ModulesDriver.cpp.
References clang::driver::Command::getInputInfos().
Referenced by applyArgsForStdModuleManifestInputs().
Definition at line 170 of file ModulesDriver.cpp.
References clang::driver::Command::getCreator(), and clang::driver::Tool::getName().
Referenced by applyArgsForStdModuleManifestInputs().
|
static |
Converts each file path in manifest from relative to absolute.
Each file path in the manifest is expected to be relative the manifest's location ManifestPath itself.
Definition at line 77 of file ModulesDriver.cpp.
|
static |
Parses the Standard library module manifest from Buffer.
Definition at line 60 of file ModulesDriver.cpp.
References clang::driver::modules::fromJSON().