clang 22.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) | |
Construct a dependency scanning worker. | |
bool | computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &DepConsumer, DependencyActionController &Controller, DiagnosticConsumer &DiagConsumer, std::optional< llvm::MemoryBufferRef > TUBuffer=std::nullopt) |
Run the dependency scanning tool for a given clang driver command-line, and report the discovered dependencies to the provided consumer. | |
bool | computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &DepConsumer, DependencyActionController &Controller, DiagnosticConsumer &DiagConsumer, StringRef ModuleName) |
Run the dependency scanning tool for a given clang driver command-line for a specific module. | |
llvm::Error | computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &Consumer, DependencyActionController &Controller, std::optional< llvm::MemoryBufferRef > TUBuffer=std::nullopt) |
Run the dependency scanning tool for a given clang driver command-line for a specific translation unit via file system or memory buffer. | |
llvm::Error | computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &Consumer, DependencyActionController &Controller, StringRef ModuleName) |
Run the dependency scanning tool for a given clang driver command-line for a specific module. | |
llvm::vfs::FileSystem & | getVFS () 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 83 of file DependencyScanningWorker.h.
DependencyScanningWorker::DependencyScanningWorker | ( | DependencyScanningService & | Service, |
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > | FS ) |
Construct a dependency scanning worker.
Service | The parent service. Must outlive the worker. |
FS | The filesystem for the worker to use. |
Definition at line 595 of file DependencyScanningWorker.cpp.
References clang::tooling::dependencies::CanonicalPreprocessing, and clang::tooling::dependencies::DependencyDirectivesScan.
llvm::Error DependencyScanningWorker::computeDependencies | ( | StringRef | WorkingDirectory, |
const std::vector< std::string > & | CommandLine, | ||
DependencyConsumer & | Consumer, | ||
DependencyActionController & | Controller, | ||
std::optional< llvm::MemoryBufferRef > | TUBuffer = std::nullopt ) |
Run the dependency scanning tool for a given clang driver command-line for a specific translation unit via file system or memory buffer.
StringError
with the diagnostic output if clang errors occurred, success otherwise. Definition at line 632 of file DependencyScanningWorker.cpp.
References computeDependencies(), and createDiagOptions().
llvm::Error DependencyScanningWorker::computeDependencies | ( | StringRef | WorkingDirectory, |
const std::vector< std::string > & | CommandLine, | ||
DependencyConsumer & | Consumer, | ||
DependencyActionController & | Controller, | ||
StringRef | ModuleName ) |
Run the dependency scanning tool for a given clang driver command-line for a specific module.
StringError
with the diagnostic output if clang errors occurred, success otherwise. Definition at line 650 of file DependencyScanningWorker.cpp.
References computeDependencies(), and createDiagOptions().
bool DependencyScanningWorker::computeDependencies | ( | StringRef | WorkingDirectory, |
const std::vector< std::string > & | CommandLine, | ||
DependencyConsumer & | DepConsumer, | ||
DependencyActionController & | Controller, | ||
DiagnosticConsumer & | DiagConsumer, | ||
std::optional< llvm::MemoryBufferRef > | TUBuffer = std::nullopt ) |
Run the dependency scanning tool for a given clang driver command-line, and report the discovered dependencies to the provided consumer.
If TUBuffer is not nullopt, it is used as TU input for the dependency scanning. Otherwise, the input should be included as part of the command-line.
DiagConsumer
), true otherwise. Definition at line 793 of file DependencyScanningWorker.cpp.
Referenced by computeDependencies(), and computeDependencies().
bool DependencyScanningWorker::computeDependencies | ( | StringRef | WorkingDirectory, |
const std::vector< std::string > & | CommandLine, | ||
DependencyConsumer & | DepConsumer, | ||
DependencyActionController & | Controller, | ||
DiagnosticConsumer & | DiagConsumer, | ||
StringRef | ModuleName ) |
Run the dependency scanning tool for a given clang driver command-line for a specific module.
DiagConsumer
), true otherwise. Definition at line 833 of file DependencyScanningWorker.cpp.
|
inline |
Definition at line 139 of file DependencyScanningWorker.h.