clang 20.0.0git
|
An individual dependency scanning worker that is able to run on its own thread. More...
#include "clang/Tooling/DependencyScanning/DependencyScanningWorker.h"
Public Member Functions | |
DependencyScanningWorker (DependencyScanningService &Service, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS) | |
bool | computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &DepConsumer, DependencyActionController &Controller, DiagnosticConsumer &DiagConsumer, std::optional< StringRef > ModuleName=std::nullopt) |
Run the dependency scanning tool for a given clang driver command-line, and report the discovered dependencies to the provided consumer. | |
llvm::Error | computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &Consumer, DependencyActionController &Controller, std::optional< StringRef > ModuleName=std::nullopt) |
bool | shouldEagerLoadModules () const |
An individual dependency scanning worker that is able to run on its own thread.
The worker computes the dependencies for the input files by preprocessing sources either using a fast mode where the source files are minimized, or using the regular processing run.
Definition at line 80 of file DependencyScanningWorker.h.
DependencyScanningWorker::DependencyScanningWorker | ( | DependencyScanningService & | Service, |
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > | FS | ||
) |
Definition at line 490 of file DependencyScanningWorker.cpp.
References clang::tooling::dependencies::CanonicalPreprocessing, clang::tooling::dependencies::DependencyDirectivesScan, clang::tooling::dependencies::DependencyScanningService::getMode(), and clang::tooling::dependencies::DependencyScanningService::getSharedCache().
llvm::Error DependencyScanningWorker::computeDependencies | ( | StringRef | WorkingDirectory, |
const std::vector< std::string > & | CommandLine, | ||
DependencyConsumer & | Consumer, | ||
DependencyActionController & | Controller, | ||
std::optional< StringRef > | ModuleName = std::nullopt |
||
) |
StringError
with the diagnostic output if clang errors occurred, success otherwise. Definition at line 515 of file DependencyScanningWorker.cpp.
References computeDependencies(), and clang::CreateAndPopulateDiagOpts().
bool DependencyScanningWorker::computeDependencies | ( | StringRef | WorkingDirectory, |
const std::vector< std::string > & | CommandLine, | ||
DependencyConsumer & | DepConsumer, | ||
DependencyActionController & | Controller, | ||
DiagnosticConsumer & | DiagConsumer, | ||
std::optional< StringRef > | ModuleName = std::nullopt |
||
) |
Run the dependency scanning tool for a given clang driver command-line, and report the discovered dependencies to the provided consumer.
If ModuleName
isn't empty, this function reports the dependencies of module ModuleName
.
DiagConsumer
), true otherwise. Definition at line 598 of file DependencyScanningWorker.cpp.
References Cmd, clang::CreateAndPopulateDiagOpts(), createAndRunToolInvocation(), clang::CompilerInstance::createDiagnostics(), forEachDriverJob(), and clang::Success.
Referenced by computeDependencies(), clang::tooling::dependencies::DependencyScanningTool::getDependencyFile(), clang::tooling::dependencies::DependencyScanningTool::getModuleDependencies(), clang::tooling::dependencies::DependencyScanningTool::getP1689ModuleDependencyFile(), and clang::tooling::dependencies::DependencyScanningTool::getTranslationUnitDependencies().
|
inline |
Definition at line 105 of file DependencyScanningWorker.h.