clang 22.0.0git
|
#include "clang/Tooling/DependencyScanning/ModuleDepCollector.h"
#include "clang/Basic/MakeSupport.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/DependencyScanning/DependencyScanningWorker.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/BLAKE3.h"
#include <optional>
Go to the source code of this file.
Macros | |
#define | IF_RELATIVE_RETURN_FALSE(PATH) |
#define | IF_ANY_RELATIVE_RETURN_FALSE(PATHS) |
Functions | |
static void | optimizeHeaderSearchOpts (HeaderSearchOptions &Opts, ASTReader &Reader, const serialization::ModuleFile &MF, const PrebuiltModulesAttrsMap &PrebuiltModulesASTMap, ScanningOptimizations OptimizeArgs) |
static void | optimizeDiagnosticOpts (DiagnosticOptions &Opts, bool IsSystemModule) |
static void | optimizeCWD (CowCompilerInvocation &BuildInvocation, StringRef CWD) |
static std::vector< std::string > | splitString (std::string S, char Separator) |
static CowCompilerInvocation | makeCommonInvocationForModuleBuild (CompilerInvocation CI) |
static bool | needsModules (FrontendInputFile FIF) |
static bool | isSafeToIgnoreCWD (const CowCompilerInvocation &CI) |
static std::string | getModuleContextHash (const ModuleDeps &MD, const CowCompilerInvocation &CI, bool EagerLoadModules, bool IgnoreCWD, llvm::vfs::FileSystem &VFS) |
static void | forEachSubmoduleSorted (const Module *M, llvm::function_ref< void(const Module *)> F) |
static StringRef | makeAbsoluteAndPreferred (CompilerInstance &CI, StringRef Path, SmallVectorImpl< char > &Storage) |
#define IF_ANY_RELATIVE_RETURN_FALSE | ( | PATHS | ) |
Referenced by isSafeToIgnoreCWD().
#define IF_RELATIVE_RETURN_FALSE | ( | PATH | ) |
Referenced by isSafeToIgnoreCWD().
|
static |
Definition at line 854 of file ModuleDepCollector.cpp.
References clang::Module::Name, and clang::Module::submodules().
|
static |
Definition at line 548 of file ModuleDepCollector.cpp.
References clang::tooling::dependencies::ModuleDeps::ClangModuleDeps, clang::CompilerInvocationBase::generateCC1CommandLine(), clang::getClangFullRepositoryVersion(), clang::tooling::dependencies::IgnoreCWD, toString(), clang::serialization::VERSION_MAJOR, clang::serialization::VERSION_MINOR, and clang::tooling::dependencies::VFS.
|
static |
Definition at line 466 of file ModuleDepCollector.cpp.
References clang::DependencyOutputOptions::ExtraDeps, clang::CompilerInvocationBase::getCodeGenOpts(), clang::CompilerInvocationBase::getDependencyOutputOpts(), clang::FrontendInputFile::getFile(), clang::CompilerInvocationBase::getFileSystemOpts(), clang::CompilerInvocationBase::getFrontendOpts(), clang::CompilerInvocationBase::getHeaderSearchOpts(), clang::CompilerInvocationBase::getLangOpts(), clang::CompilerInvocationBase::getPreprocessorOpts(), IF_ANY_RELATIVE_RETURN_FALSE, IF_RELATIVE_RETURN_FALSE, clang::FrontendInputFile::isBuffer(), and clang::LangOptions::NoSanitizeFiles.
|
static |
Definition at line 1004 of file ModuleDepCollector.cpp.
References clang::CompilerInstance::getFileManager(), and clang::FileManager::makeAbsolutePath().
|
static |
Definition at line 252 of file ModuleDepCollector.cpp.
References clang::CompilerInvocation::clearImplicitModuleBuildOptions(), clang::DiagnosticOptions::DiagnosticSerializationFile, clang::frontend::GenerateModule, clang::CompilerInvocation::getCodeGenOpts(), clang::CompilerInvocation::getDependencyOutputOpts(), clang::CompilerInvocation::getDiagnosticOpts(), clang::CompilerInvocation::getFrontendOpts(), clang::CompilerInvocation::getHeaderSearchOpts(), clang::CompilerInvocation::getLangOpts(), clang::CompilerInvocation::getPreprocessorOpts(), clang::FrontendOptions::Inputs, clang::FrontendOptions::LLVMArgs, clang::PreprocessorOptions::Macros, clang::LangOptions::ModuleName, clang::HeaderSearchOptions::ModulesIgnoreMacros, clang::HeaderSearchOptions::ModulesPruneNonAffectingModuleMaps, clang::DependencyOutputOptions::OutputFile, clang::FrontendOptions::OutputFile, clang::FrontendOptions::ProgramAction, clang::tooling::dependencies::resetBenignCodeGenOptions(), clang::CompilerInvocation::resetNonModularOptions(), and clang::DependencyOutputOptions::Targets.
Referenced by clang::tooling::dependencies::ModuleDepCollector::ModuleDepCollector().
|
static |
Definition at line 425 of file ModuleDepCollector.cpp.
References clang::Asm, clang::FrontendInputFile::getKind(), clang::InputKind::getLanguage(), clang::LLVM_IR, and clang::Unknown.
Referenced by clang::tooling::dependencies::ModuleDepCollector::applyDiscoveredDependencies().
|
static |
Definition at line 145 of file ModuleDepCollector.cpp.
References clang::CodeGenOptions::CoverageCompilationDir, clang::CodeGenOptions::DebugCompilationDir, clang::CowCompilerInvocation::getMutCodeGenOpts(), clang::CowCompilerInvocation::getMutFileSystemOpts(), and clang::FileSystemOptions::WorkingDir.
|
static |
Definition at line 123 of file ModuleDepCollector.cpp.
References clang::DiagnosticOptions::Remarks, clang::DiagnosticOptions::UndefPrefixes, and clang::DiagnosticOptions::Warnings.
|
static |
Definition at line 54 of file ModuleDepCollector.cpp.
References any(), clang::serialization::ModuleFile::FileName, std::function, clang::tooling::dependencies::HeaderSearch, clang::tooling::Import, clang::serialization::ModuleFile::Imports, clang::serialization::ModuleFile::Kind, clang::serialization::MK_ImplicitModule, clang::serialization::ModuleFile::SearchPathUsage, clang::HeaderSearchOptions::UserEntries, clang::tooling::dependencies::VFS, clang::HeaderSearchOptions::VFSOverlayFiles, and clang::serialization::ModuleFile::VFSUsage.
|
static |
Definition at line 151 of file ModuleDepCollector.cpp.