|
clang 22.0.0git
|
Builds a dependency file when attached to a Preprocessor (for includes) and ASTReader (for module imports), and writes it out at the end of processing a source file. More...
#include "clang/Frontend/Utils.h"
Public Member Functions | |
| DependencyFileGenerator (const DependencyOutputOptions &Opts) | |
| void | attachToPreprocessor (Preprocessor &PP) override |
| void | finishedMainFile (DiagnosticsEngine &Diags) override |
| Called when the end of the main file is reached. | |
| bool | needSystemDependencies () final |
| Return true if system files should be passed to sawDependency(). | |
| bool | sawDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) final |
| Called when a new file is seen. | |
| Public Member Functions inherited from clang::DependencyCollector | |
| virtual | ~DependencyCollector () |
| virtual void | attachToASTReader (ASTReader &R) |
| ArrayRef< std::string > | getDependencies () const |
| 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 | |
| void | outputDependencyFile (llvm::raw_ostream &OS) |
| 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. | |
Builds a dependency file when attached to a Preprocessor (for includes) and ASTReader (for module imports), and writes it out at the end of processing a source file.
Users should attach to the ast reader whenever a module is loaded.
| DependencyFileGenerator::DependencyFileGenerator | ( | const DependencyOutputOptions & | Opts | ) |
Definition at line 230 of file DependencyFile.cpp.
References clang::DependencyOutputOptions::ExtraDeps, and false.
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 244 of file DependencyFile.cpp.
References clang::DependencyCollector::attachToPreprocessor(), and clang::Preprocessor::SetSuppressIncludeNotFoundError().
|
overridevirtual |
Called when the end of the main file is reached.
Reimplemented from clang::DependencyCollector.
Definition at line 274 of file DependencyFile.cpp.
References outputDependencyFile().
|
inlinefinalvirtual |
Return true if system files should be passed to sawDependency().
Reimplemented from clang::DependencyCollector.
|
protected |
Definition at line 373 of file DependencyFile.cpp.
References clang::File, clang::DependencyCollector::getDependencies(), PrintFilename(), and clang::Target.
Referenced by finishedMainFile().
|
finalvirtual |
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 from clang::DependencyCollector.
Definition at line 252 of file DependencyFile.cpp.
References isSpecialFilename().