clang 20.0.0git
|
Collects modular and non-modular dependencies of the main file by attaching ModuleDepCollectorPP
to the preprocessor.
More...
#include "clang/Tooling/DependencyScanning/ModuleDepCollector.h"
Public Member Functions | |
ModuleDepCollector (std::unique_ptr< DependencyOutputOptions > Opts, CompilerInstance &ScanInstance, DependencyConsumer &C, DependencyActionController &Controller, CompilerInvocation OriginalCI, PrebuiltModuleVFSMapT PrebuiltModuleVFSMap, ScanningOptimizations OptimizeArgs, bool EagerLoadModules, bool IsStdModuleP1689Format) | |
void | attachToPreprocessor (Preprocessor &PP) override |
void | attachToASTReader (ASTReader &R) override |
void | applyDiscoveredDependencies (CompilerInvocation &CI) |
Apply any changes implied by the discovered dependencies to the given invocation, (e.g. | |
Public Member Functions inherited from clang::DependencyCollector | |
virtual | ~DependencyCollector () |
virtual void | attachToPreprocessor (Preprocessor &PP) |
virtual void | attachToASTReader (ASTReader &R) |
ArrayRef< std::string > | getDependencies () const |
virtual bool | sawDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) |
Called when a new file is seen. | |
virtual void | finishedMainFile (DiagnosticsEngine &Diags) |
Called when the end of the main file is reached. | |
virtual bool | needSystemDependencies () |
Return true if system files should be passed to sawDependency(). | |
virtual void | maybeAddDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) |
Add a dependency Filename if it has not been seen before and sawDependency() returns true. | |
Additional Inherited Members | |
Protected Member Functions inherited from clang::DependencyCollector | |
bool | addDependency (StringRef Filename) |
Return true if the filename was added to the list of dependencies, false otherwise. | |
Collects modular and non-modular dependencies of the main file by attaching ModuleDepCollectorPP
to the preprocessor.
Definition at line 218 of file ModuleDepCollector.h.
ModuleDepCollector::ModuleDepCollector | ( | std::unique_ptr< DependencyOutputOptions > | Opts, |
CompilerInstance & | ScanInstance, | ||
DependencyConsumer & | C, | ||
DependencyActionController & | Controller, | ||
CompilerInvocation | OriginalCI, | ||
PrebuiltModuleVFSMapT | PrebuiltModuleVFSMap, | ||
ScanningOptimizations | OptimizeArgs, | ||
bool | EagerLoadModules, | ||
bool | IsStdModuleP1689Format | ||
) |
Definition at line 736 of file ModuleDepCollector.cpp.
void ModuleDepCollector::applyDiscoveredDependencies | ( | CompilerInvocation & | CI | ) |
Apply any changes implied by the discovered dependencies to the given invocation, (e.g.
disable implicit modules, add explicit module paths).
Definition at line 358 of file ModuleDepCollector.cpp.
References clang::CompilerInvocation::clearImplicitModuleBuildOptions(), clang::CompilerInvocation::getCodeGenOpts(), clang::Preprocessor::getCurrentModuleImplementation(), clang::CompilerInvocation::getFrontendOpts(), clang::Preprocessor::getHeaderSearchInfo(), clang::CompilerInvocation::getLangOpts(), clang::HeaderSearch::getModuleMap(), clang::ModuleMap::getModuleMapFileForUniquing(), clang::CompilerInstance::getPreprocessor(), clang::FrontendOptions::Inputs, clang::FrontendOptions::ModuleFiles, clang::FrontendOptions::ModuleMapFiles, needsModules(), clang::FrontendOptions::ProgramAction, and clang::tooling::dependencies::resetBenignCodeGenOptions().
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 755 of file ModuleDepCollector.cpp.
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 751 of file ModuleDepCollector.cpp.
References clang::Preprocessor::addPPCallbacks().