|
clang 24.0.0git
|
#include "clang/DependencyScanning/DependencyScanningWorker.h"#include "clang/Basic/Diagnostic.h"#include "clang/Basic/DiagnosticFrontend.h"#include "clang/Basic/DiagnosticSerialization.h"#include "clang/DependencyScanning/DependencyActionController.h"#include "clang/DependencyScanning/DependencyConsumer.h"#include "clang/DependencyScanning/DependencyScanningFilesystem.h"#include "clang/Frontend/FrontendActions.h"#include "clang/Lex/Preprocessor.h"#include "clang/Sema/SemaOpenACC.h"#include "clang/Serialization/ObjectFilePCHContainerReader.h"#include "llvm/ADT/IntrusiveRefCntPtr.h"#include "llvm/ADT/ScopeExit.h"#include "llvm/Option/Option.h"#include "llvm/Support/AdvisoryLock.h"#include "llvm/Support/CrashRecoveryContext.h"#include "llvm/Support/VirtualFileSystem.h"#include "llvm/TargetParser/Host.h"#include <mutex>#include <thread>Go to the source code of this file.
Classes | |
| class | clang::dependencies::CompilerInstanceWithContext |
Namespaces | |
| namespace | clang |
| The JSON file list parser is used to communicate input to InstallAPI. | |
| namespace | clang::dependencies |
Functions | |
| static bool | checkHeaderSearchPaths (const HeaderSearchOptions &HSOpts, const HeaderSearchOptions &ExistingHSOpts, DiagnosticsEngine *Diags, const LangOptions &LangOpts) |
| static bool | visitPrebuiltModule (StringRef PrebuiltModuleFilename, CompilerInstance &CI, PrebuiltModuleFilesT &ModuleFiles, PrebuiltModulesAttrsMap &PrebuiltModulesASTMap, DiagnosticsEngine &Diags, const ArrayRef< StringRef > StableDirs) |
| Visit the given prebuilt module and collect all of the modules it transitively imports and contributing input files. | |
| static std::string | makeObjFileName (StringRef FileName) |
| Transform arbitrary file name into an object-like file name. | |
| static std::string | deduceDepTarget (const std::string &OutputFile, const SmallVectorImpl< FrontendInputFile > &InputFiles) |
| Deduce the dependency target based on the output file and input files. | |
| static std::optional< StringRef > | getSimpleMacroName (StringRef Macro) |
| static void | canonicalizeDefines (PreprocessorOptions &PPOpts) |
| static void | sanitizeDiagOpts (DiagnosticOptions &DiagOpts) |
| Sanitize diagnostic options for dependency scan. | |
| static std::unique_ptr< CompilerInvocation > | createCompilerInvocation (ArrayRef< std::string > CommandLine, DiagnosticsEngine &Diags) |
| static void | initializeScanCompilerInstance (CompilerInstance &ScanInstance, IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS, DiagnosticConsumer *DiagConsumer, DependencyScanningService &Service, IntrusiveRefCntPtr< DependencyScanningWorkerFilesystem > DepFS) |
| static std::shared_ptr< CompilerInvocation > | createScanCompilerInvocation (const CompilerInvocation &Invocation, const DependencyScanningService &Service, DependencyActionController &Controller) |
| static llvm::SmallVector< StringRef > | getInitialStableDirs (const CompilerInstance &ScanInstance) |
| static std::optional< PrebuiltModulesAttrsMap > | computePrebuiltModulesASTMap (CompilerInstance &ScanInstance, llvm::SmallVector< StringRef > &StableDirs) |
| static std::unique_ptr< DependencyOutputOptions > | createDependencyOutputOptions (const CompilerInvocation &Invocation) |
| static std::shared_ptr< ModuleDepCollector > | initializeScanInstanceDependencyCollector (CompilerInstance &ScanInstance, std::unique_ptr< DependencyOutputOptions > DepOutputOpts, DependencyScanningService &Service, CompilerInvocation &Inv, DependencyActionController &Controller, PrebuiltModulesAttrsMap PrebuiltModulesASTMap, SmallVector< StringRef > &StableDirs) |
| static void | runTUModulePrescan (CompilerInstance &PrescanCI, DependencyScanningService &Service, DependencyActionController &Controller, AsyncModuleCompiles &Compiles) |
| std::unique_ptr< DiagnosticOptions > | clang::dependencies::createScanningDiagOptions (ArrayRef< std::string > CommandLine) |
|
static |
Definition at line 274 of file DependencyScanningWorker.cpp.
References getSimpleMacroName(), and clang::PreprocessorOptions::Macros.
Referenced by clang::dependencies::DependencyScanningWorker::computeDependencies().
|
static |
Definition at line 33 of file DependencyScanningWorker.cpp.
References clang::DiagnosticsEngine::Report(), and clang::HeaderSearchOptions::VFSOverlayFiles.
|
static |
Definition at line 461 of file DependencyScanningWorker.cpp.
References clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getHeaderSearchOpts(), clang::CompilerInstance::getPreprocessorOpts(), clang::PreprocessorOptions::ImplicitPCHInclude, clang::HeaderSearchOptions::PrebuiltModuleFiles, and visitPrebuiltModule().
|
static |
Definition at line 356 of file DependencyScanningWorker.cpp.
References clang::CompilerInvocation::CreateFromArgs().
Referenced by clang::dependencies::DependencyScanningWorker::computeDependencies().
|
static |
Definition at line 480 of file DependencyScanningWorker.cpp.
References deduceDepTarget(), clang::CompilerInvocation::getDependencyOutputOpts(), clang::CompilerInvocation::getFrontendOpts(), clang::FrontendOptions::Inputs, and clang::FrontendOptions::OutputFile.
|
static |
Definition at line 391 of file DependencyScanningWorker.cpp.
References any(), clang::dependencies::DependencyScanningServiceOptions::BuildSessionTimestamp, clang::dependencies::DependencyScanningService::getOpts(), clang::dependencies::DependencyActionController::initializeScanInvocation(), clang::dependencies::DependencyScanningServiceOptions::OptimizeArgs, and sanitizeDiagOpts().
|
static |
Deduce the dependency target based on the output file and input files.
Definition at line 225 of file DependencyScanningWorker.cpp.
References makeObjFileName().
Referenced by createDependencyOutputOptions().
|
static |
Definition at line 449 of file DependencyScanningWorker.cpp.
References clang::CompilerInstance::getHeaderSearchOpts(), clang::HeaderSearchOptions::ResourceDir, and clang::HeaderSearchOptions::Sysroot.
|
static |
Definition at line 246 of file DependencyScanningWorker.cpp.
References clang::Macro.
Referenced by canonicalizeDefines().
|
static |
Definition at line 370 of file DependencyScanningWorker.cpp.
References clang::CompilerInstance::createDiagnostics(), clang::CompilerInstance::createFileManager(), clang::CompilerInstance::createSourceManager(), clang::CompilerInstance::createVirtualFileSystem(), clang::dependencies::DependencyScanningServiceOptions::EmitWarnings, clang::CompilerInstance::getDiagnostics(), clang::CompilerInstance::getFileManager(), clang::dependencies::DependencyScanningService::getOpts(), clang::dependencies::DependencyScanningServiceOptions::Mode, clang::ModuleLoader::setBuildingModule(), clang::CompilerInstance::setDependencyDirectivesGetter(), and clang::DiagnosticsEngine::setIgnoreAllWarnings().
|
static |
Definition at line 494 of file DependencyScanningWorker.cpp.
References clang::CompilerInstance::addDependencyCollector().
Referenced by clang::dependencies::CompilerInstanceWithContext::computeDependencies(), and clang::dependencies::CompilerInstanceWithContext::scanTranslationUnit().
|
static |
Transform arbitrary file name into an object-like file name.
Definition at line 217 of file DependencyScanningWorker.cpp.
References clang::FileName.
Referenced by deduceDepTarget().
|
static |
Definition at line 679 of file DependencyScanningWorker.cpp.
References clang::CompilerInstance::ExecuteAction().
|
static |
Sanitize diagnostic options for dependency scan.
Definition at line 335 of file DependencyScanningWorker.cpp.
References clang::DiagnosticOptions::DiagnosticSerializationFile, clang::Warning, and clang::DiagnosticOptions::Warnings.
Referenced by createScanCompilerInvocation(), and clang::dependencies::createScanningDiagOptions().
|
static |
Visit the given prebuilt module and collect all of the modules it transitively imports and contributing input files.
Definition at line 174 of file DependencyScanningWorker.cpp.
References clang::ASTReader::ARR_OutOfDate, clang::CompilerInstance::getFileManager(), clang::CompilerInstance::getHeaderSearchOpts(), clang::CompilerInstance::getLangOpts(), clang::CompilerInstance::getModuleCache(), clang::CompilerInstance::getPCHContainerReader(), clang::ModuleFileName::makeExplicit(), clang::serialization::MK_ExplicitModule, and clang::ASTReader::readASTFileControlBlock().
Referenced by computePrebuiltModulesASTMap().