clang 22.0.0git
clang::tooling::dependencies::DependencyScanningAction Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.h"

Public Member Functions

 DependencyScanningAction (DependencyScanningService &Service, StringRef WorkingDirectory, DependencyConsumer &Consumer, DependencyActionController &Controller, llvm::IntrusiveRefCntPtr< DependencyScanningWorkerFilesystem > DepFS, std::optional< StringRef > ModuleName=std::nullopt)
bool runInvocation (std::shared_ptr< CompilerInvocation > Invocation, IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS, std::shared_ptr< PCHContainerOperations > PCHContainerOps, DiagnosticConsumer *DiagConsumer)
bool hasScanned () const
bool hasDiagConsumerFinished () const
std::vector< std::string > takeLastCC1Arguments ()
 Take the cc1 arguments corresponding to the most recent invocation used with this action.

Detailed Description

Definition at line 28 of file DependencyScannerImpl.h.

Constructor & Destructor Documentation

◆ DependencyScanningAction()

clang::tooling::dependencies::DependencyScanningAction::DependencyScanningAction ( DependencyScanningService & Service,
StringRef WorkingDirectory,
DependencyConsumer & Consumer,
DependencyActionController & Controller,
llvm::IntrusiveRefCntPtr< DependencyScanningWorkerFilesystem > DepFS,
std::optional< StringRef > ModuleName = std::nullopt )
inline

Definition at line 30 of file DependencyScannerImpl.h.

Member Function Documentation

◆ hasDiagConsumerFinished()

bool clang::tooling::dependencies::DependencyScanningAction::hasDiagConsumerFinished ( ) const
inline

Definition at line 44 of file DependencyScannerImpl.h.

◆ hasScanned()

bool clang::tooling::dependencies::DependencyScanningAction::hasScanned ( ) const
inline

Definition at line 43 of file DependencyScannerImpl.h.

◆ runInvocation()

bool DependencyScanningAction::runInvocation ( std::shared_ptr< CompilerInvocation > Invocation,
IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS,
std::shared_ptr< PCHContainerOperations > PCHContainerOps,
DiagnosticConsumer * DiagConsumer )

Definition at line 359 of file DependencyScannerImpl.cpp.

References clang::CompilerInstance::addDependencyCollector(), clang::PreprocessorOptions::AllowPCHWithDifferentModulesCachePath, any(), clang::HeaderSearchOptions::BuildSessionTimestamp, clang::CompilerInstance::createDiagnostics(), clang::CompilerInstance::createFileManager(), clang::CompilerInstance::createSourceManager(), clang::CompilerInstance::createVirtualFileSystem(), clang::FrontendOptions::DisableFree, clang::CompilerInstance::ExecuteAction(), clang::tooling::dependencies::Full, clang::FrontendOptions::GenerateGlobalModuleIndex, clang::CompilerInvocation::getDependencyOutputOpts(), clang::CompilerInstance::getDiagnosticOpts(), clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getFrontendOpts(), clang::CompilerInstance::getHeaderSearchOpts(), clang::CompilerInstance::getInvocation(), clang::CompilerInstance::getPreprocessorOpts(), clang::CompilerInstance::hasDiagnostics(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::PreprocessorOptions::ImplicitPCHInclude, clang::FrontendOptions::Inputs, clang::tooling::dependencies::Macros, clang::tooling::dependencies::Make, clang::tooling::dependencies::makeInProcessModuleCache(), clang::HeaderSearchOptions::ModuleCachePath, clang::HeaderSearchOptions::ModuleFormat, clang::PreprocessorOptions::ModulesCheckRelocated, clang::HeaderSearchOptions::ModulesForceValidateUserHeaders, clang::HeaderSearchOptions::ModulesIncludeVFSUsage, clang::HeaderSearchOptions::ModulesSerializeOnlyPreprocessor, clang::FrontendOptions::ModulesShareFileManager, clang::HeaderSearchOptions::ModulesSkipDiagnosticOptions, clang::HeaderSearchOptions::ModulesSkipHeaderSearchPaths, clang::HeaderSearchOptions::ModulesSkipPragmaDiagnosticMappings, clang::HeaderSearchOptions::ModulesStrictContextHash, clang::HeaderSearchOptions::ModulesValidateOncePerBuildSession, clang::normalizeModuleCachePath(), clang::FrontendOptions::OutputFile, clang::tooling::dependencies::P1689, clang::HeaderSearchOptions::PrebuiltModuleFiles, clang::HeaderSearchOptions::ResourceDir, clang::Result, clang::tooling::dependencies::sanitizeDiagOpts(), clang::ModuleLoader::setBuildingModule(), clang::CompilerInstance::setDependencyDirectivesGetter(), clang::HeaderSearchOptions::Sysroot, clang::FrontendOptions::UseGlobalModuleIndex, and clang::tooling::dependencies::VFS.

Referenced by createAndRunToolInvocation().

◆ takeLastCC1Arguments()

std::vector< std::string > clang::tooling::dependencies::DependencyScanningAction::takeLastCC1Arguments ( )
inline

Take the cc1 arguments corresponding to the most recent invocation used with this action.

Any modifications implied by the discovered dependencies will have already been applied.

Definition at line 49 of file DependencyScannerImpl.h.

References clang::Result.

Referenced by createAndRunToolInvocation().


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