9#ifndef LLVM_CLANG_DEPENDENCYSCANNING_DEPENDENCYACTIONCONTROLLER_H
10#define LLVM_CLANG_DEPENDENCYSCANNING_DEPENDENCYACTIONCONTROLLER_H
45 virtual std::unique_ptr<DependencyActionController>
clone()
const = 0;
69 virtual std::optional<std::string>
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Helper class for holding the data necessary to invoke the compiler.
Same as CompilerInvocation, but with copy-on-write optimization.
Dependency scanner callbacks that are used during scanning to influence the behaviour of the scan - f...
virtual std::unique_ptr< DependencyActionController > clone() const =0
Creates a copy of the controller. The result must be both thread-safe.
virtual bool finalizeModuleInvocation(CompilerInstance &ScanInstance, CowCompilerInvocation &CI, const ModuleDeps &MD)
Modifies the resulting module invocation and the associated structure.
virtual void initializeScanInvocation(CompilerInvocation &ScanInvocation)
Initializes the scan invocation.
virtual std::string lookupModuleOutput(const ModuleDeps &MD, ModuleOutputKind Kind)=0
Provides output path for a given module dependency. Must be thread-safe.
virtual std::optional< std::string > getCacheKey(const CompilerInvocation &NewInvocation)
Returns the cache key for the resulting invocation, or nullopt.
virtual ~DependencyActionController()=default
virtual bool initialize(CompilerInstance &ScanInstance, CompilerInvocation &NewInvocation)
Initializes the scan instance and modifies the resulting TU invocation.
virtual bool initializeModuleBuild(CompilerInstance &ModuleScanInstance)
Initializes the module scan instance.
virtual bool finalize(CompilerInstance &ScanInstance, CompilerInvocation &NewInvocation)
Finalizes the scan instance and modifies the resulting TU invocation.
virtual bool finalizeModuleBuild(CompilerInstance &ModuleScanInstance)
Finalizes the module scan instance.
ModuleOutputKind
An output from a module compilation, such as the path of the module file.
@ DiagnosticSerializationFile
The path of the serialized diagnostic file (.dia), if any.
@ DependencyFile
The path of the dependency file (.d), if any.
@ DependencyTargets
The null-separated list of names to use as the targets in the dependency file, if any.
@ ModuleFile
The module file (.pcm). Required.
The JSON file list parser is used to communicate input to InstallAPI.