clang 23.0.0git
clang::dependencies::DependencyActionController Class Referenceabstract

Dependency scanner callbacks that are used during scanning to influence the behaviour of the scan - for example, to customize the scanned invocations. More...

#include "clang/DependencyScanning/DependencyScanningWorker.h"

Inheritance diagram for clang::dependencies::DependencyActionController:
[legend]

Public Member Functions

virtual ~DependencyActionController ()
virtual std::unique_ptr< DependencyActionControllerclone () const =0
 Creates a copy of the controller. The result must be both thread-safe.
virtual std::string lookupModuleOutput (const ModuleDeps &MD, ModuleOutputKind Kind)=0
 Provides output path for a given module dependency. Must be thread-safe.
virtual void initializeScanInvocation (CompilerInvocation &ScanInvocation)
 Initializes the scan invocation.
virtual bool initialize (CompilerInstance &ScanInstance, CompilerInvocation &NewInvocation)
 Initializes the scan instance and modifies the resulting TU invocation.
virtual bool finalize (CompilerInstance &ScanInstance, CompilerInvocation &NewInvocation)
 Finalizes the scan instance and modifies the resulting TU invocation.
virtual std::optional< std::string > getCacheKey (const CompilerInvocation &NewInvocation)
 Returns the cache key for the resulting invocation, or nullopt.
virtual bool initializeModuleBuild (CompilerInstance &ModuleScanInstance)
 Initializes the module scan instance.
virtual bool finalizeModuleBuild (CompilerInstance &ModuleScanInstance)
 Finalizes the module scan instance.
virtual bool finalizeModuleInvocation (CompilerInstance &ScanInstance, CowCompilerInvocation &CI, const ModuleDeps &MD)
 Modifies the resulting module invocation and the associated structure.

Detailed Description

Dependency scanner callbacks that are used during scanning to influence the behaviour of the scan - for example, to customize the scanned invocations.

Definition at line 74 of file DependencyScanningWorker.h.

Constructor & Destructor Documentation

◆ ~DependencyActionController()

DependencyActionController::~DependencyActionController ( )
virtualdefault

Member Function Documentation

◆ clone()

virtual std::unique_ptr< DependencyActionController > clang::dependencies::DependencyActionController::clone ( ) const
pure virtual

Creates a copy of the controller. The result must be both thread-safe.

Implemented in clang::dependencies::CallbackActionController.

◆ finalize()

virtual bool clang::dependencies::DependencyActionController::finalize ( CompilerInstance & ScanInstance,
CompilerInvocation & NewInvocation )
inlinevirtual

Finalizes the scan instance and modifies the resulting TU invocation.

Returns true on success, false on failure.

Definition at line 97 of file DependencyScanningWorker.h.

Referenced by clang::tooling::CompilerInstanceWithContext::computeDependencies().

◆ finalizeModuleBuild()

virtual bool clang::dependencies::DependencyActionController::finalizeModuleBuild ( CompilerInstance & ModuleScanInstance)
inlinevirtual

Finalizes the module scan instance.

Returns true on success, false on failure.

Definition at line 116 of file DependencyScanningWorker.h.

◆ finalizeModuleInvocation()

virtual bool clang::dependencies::DependencyActionController::finalizeModuleInvocation ( CompilerInstance & ScanInstance,
CowCompilerInvocation & CI,
const ModuleDeps & MD )
inlinevirtual

Modifies the resulting module invocation and the associated structure.

Returns true on success, false on failure.

Definition at line 122 of file DependencyScanningWorker.h.

◆ getCacheKey()

virtual std::optional< std::string > clang::dependencies::DependencyActionController::getCacheKey ( const CompilerInvocation & NewInvocation)
inlinevirtual

Returns the cache key for the resulting invocation, or nullopt.

Definition at line 104 of file DependencyScanningWorker.h.

◆ initialize()

virtual bool clang::dependencies::DependencyActionController::initialize ( CompilerInstance & ScanInstance,
CompilerInvocation & NewInvocation )
inlinevirtual

Initializes the scan instance and modifies the resulting TU invocation.

Returns true on success, false on failure.

Definition at line 90 of file DependencyScanningWorker.h.

Referenced by clang::tooling::CompilerInstanceWithContext::computeDependencies().

◆ initializeModuleBuild()

virtual bool clang::dependencies::DependencyActionController::initializeModuleBuild ( CompilerInstance & ModuleScanInstance)
inlinevirtual

Initializes the module scan instance.

Returns true on success, false on failure.

Definition at line 110 of file DependencyScanningWorker.h.

◆ initializeScanInvocation()

virtual void clang::dependencies::DependencyActionController::initializeScanInvocation ( CompilerInvocation & ScanInvocation)
inlinevirtual

Initializes the scan invocation.

Definition at line 86 of file DependencyScanningWorker.h.

Referenced by clang::dependencies::createScanCompilerInvocation().

◆ lookupModuleOutput()

virtual std::string clang::dependencies::DependencyActionController::lookupModuleOutput ( const ModuleDeps & MD,
ModuleOutputKind Kind )
pure virtual

Provides output path for a given module dependency. Must be thread-safe.

Implemented in clang::dependencies::CallbackActionController.


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