clang 20.0.0git
|
An interface for collecting the dependencies of a compilation. More...
#include "clang/Frontend/Utils.h"
Public Member Functions | |
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. | |
Protected Member Functions | |
bool | addDependency (StringRef Filename) |
Return true if the filename was added to the list of dependencies, false otherwise. | |
An interface for collecting the dependencies of a compilation.
Users should use attachToPreprocessor
and attachToASTReader
to get all of the dependencies. FIXME: Migrate DependencyGraphGen to use this interface.
|
virtual |
Definition at line 208 of file DependencyFile.cpp.
|
protected |
Return true if the filename was added to the list of dependencies, false otherwise.
Definition at line 178 of file DependencyFile.cpp.
References Filename.
Referenced by clang::DependencyFileGenerator::DependencyFileGenerator(), and maybeAddDependency().
|
virtual |
Reimplemented in clang::ModuleDependencyCollector, and clang::tooling::dependencies::ModuleDepCollector.
Definition at line 214 of file DependencyFile.cpp.
References clang::ASTReader::addListener(), and clang::ASTReader::getFileManager().
|
virtual |
Reimplemented in clang::DependencyFileGenerator, clang::ModuleDependencyCollector, and clang::tooling::dependencies::ModuleDepCollector.
Definition at line 209 of file DependencyFile.cpp.
References clang::ModuleMap::addModuleMapCallbacks(), clang::Preprocessor::addPPCallbacks(), clang::Preprocessor::getHeaderSearchInfo(), and clang::HeaderSearch::getModuleMap().
Referenced by clang::DependencyFileGenerator::attachToPreprocessor().
|
inlinevirtual |
Called when the end of the main file is reached.
Reimplemented in clang::DependencyFileGenerator.
|
inline |
Definition at line 69 of file Utils.h.
Referenced by clang::DependencyFileGenerator::outputDependencyFile().
|
virtual |
Add a dependency Filename
if it has not been seen before and sawDependency() returns true.
Definition at line 170 of file DependencyFile.cpp.
References addDependency(), Filename, and sawDependency().
|
inlinevirtual |
Return true if system files should be passed to sawDependency().
Reimplemented in clang::DependencyFileGenerator.
Definition at line 82 of file Utils.h.
Referenced by sawDependency().
|
virtual |
Called when a new file is seen.
Return true if Filename
should be added to the list of dependencies.
The default implementation ignores <built-in> and system files.
Reimplemented in clang::DependencyFileGenerator.
Definition at line 201 of file DependencyFile.cpp.
References Filename, isSpecialFilename(), and needSystemDependencies().
Referenced by maybeAddDependency().