clang  14.0.0git
Public Member Functions | List of all members
clang::tooling::dependencies::DependencyScanningWorker Class Reference

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::Error computeDependencies (StringRef WorkingDirectory, const std::vector< std::string > &CommandLine, DependencyConsumer &Consumer, llvm::Optional< StringRef > ModuleName=None)
 Run the dependency scanning tool for a given clang driver command-line, and report the discovered dependencies to the provided consumer. More...
 

Detailed 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.

Definition at line 54 of file DependencyScanningWorker.h.

Constructor & Destructor Documentation

◆ DependencyScanningWorker()

DependencyScanningWorker::DependencyScanningWorker ( DependencyScanningService Service)

Member Function Documentation

◆ computeDependencies()

llvm::Error DependencyScanningWorker::computeDependencies ( StringRef  WorkingDirectory,
const std::vector< std::string > &  CommandLine,
DependencyConsumer Consumer,
llvm::Optional< StringRef >  ModuleName = None 
)

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.

Returns
A StringError with the diagnostic output if clang errors occurred, success otherwise.

Definition at line 329 of file DependencyScanningWorker.cpp.

References clang::CreateAndPopulateDiagOpts(), clang::tooling::ToolInvocation::run(), runWithDiags(), clang::tooling::ToolInvocation::setDiagnosticConsumer(), clang::tooling::ToolInvocation::setDiagnosticOptions(), and string().

Referenced by clang::tooling::dependencies::DependencyScanningTool::getFullDependencies().


The documentation for this class was generated from the following files: