class DependencyScanningWorker
Declaration
class DependencyScanningWorker { /* full declaration omitted */ };
Description
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.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:53
Member Variables
- private std::shared_ptr<PCHContainerOperations> PCHContainerOps
- private llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> RealFS
- The physical filesystem overlaid by `InMemoryFS`.
- private llvm::IntrusiveRefCntPtr< llvm::vfs::InMemoryFileSystem> InMemoryFS
- The in-memory filesystem laid on top the physical filesystem in `RealFS`.
- private llvm::IntrusiveRefCntPtr< DependencyScanningWorkerFilesystem> DepFS
- The file system that is used by each worker when scanning for dependencies. This filesystem persists across multiple compiler invocations.
- private llvm::IntrusiveRefCntPtr<FileManager> Files
- The file manager that is reused across multiple invocations by this worker. If null, the file manager will not be reused.
- private clang::tooling::dependencies::ScanningOutputFormat Format
- private bool OptimizeArgs
- Whether to optimize the modules' command-line arguments.
Method Overview
- public DependencyScanningWorker(clang::tooling::dependencies::DependencyScanningService & Service, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS)
- public llvm::Error computeDependencies(llvm::StringRef WorkingDirectory, const std::vector<std::string> & CommandLine, clang::tooling::dependencies::DependencyConsumer & Consumer, llvm::Optional<StringRef> ModuleName = None)
Methods
¶DependencyScanningWorker(
clang::tooling::dependencies::
DependencyScanningService& Service,
llvm::IntrusiveRefCntPtr<
llvm::vfs::FileSystem> FS)
DependencyScanningWorker(
clang::tooling::dependencies::
DependencyScanningService& Service,
llvm::IntrusiveRefCntPtr<
llvm::vfs::FileSystem> FS)
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:55
Parameters
- clang::tooling::dependencies:: DependencyScanningService& Service
- llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS
¶llvm::Error computeDependencies(
llvm::StringRef WorkingDirectory,
const std::vector<std::string>& CommandLine,
clang::tooling::dependencies::
DependencyConsumer& Consumer,
llvm::Optional<StringRef> ModuleName = None)
llvm::Error computeDependencies(
llvm::StringRef WorkingDirectory,
const std::vector<std::string>& CommandLine,
clang::tooling::dependencies::
DependencyConsumer& Consumer,
llvm::Optional<StringRef> ModuleName = None)
Description
Run the dependency scanning tool for a given clang driver command-line, and report the discovered dependencies to the provided consumer. If \p ModuleName isn't empty, this function reports the dependencies of module\p ModuleName.
Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:65
Parameters
- llvm::StringRef WorkingDirectory
- const std::vector<std::string>& CommandLine
- clang::tooling::dependencies::DependencyConsumer& Consumer
- llvm::Optional<StringRef> ModuleName = None
Returns
A \c StringError with the diagnostic output if clang errors occurred, success otherwise.