class DependencyFileGenerator
Declaration
class DependencyFileGenerator : public DependencyCollector { /* full declaration omitted */ };
Description
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.
Declared at: clang/include/clang/Frontend/Utils.h:102
Inherits from: DependencyCollector
Member Variables
- private std::string OutputFile
- private std::vector<std::string> Targets
- private bool IncludeSystemHeaders
- private bool PhonyTarget
- private bool AddMissingHeaderDeps
- private bool SeenMissingHeader
- private bool IncludeModuleFiles
- private clang::DependencyOutputFormat OutputFormat
- private unsigned int InputFileIndex
Method Overview
- public DependencyFileGenerator(const clang::DependencyOutputOptions & Opts)
- public void attachToPreprocessor(clang::Preprocessor & PP)
- public void finishedMainFile(clang::DiagnosticsEngine & Diags)
- public bool needSystemDependencies()
- protected void outputDependencyFile(llvm::raw_ostream & OS)
- private void outputDependencyFile(clang::DiagnosticsEngine & Diags)
- public bool sawDependency(llvm::StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing)
Inherited from DependencyCollector:
- protected addDependency
- public attachToASTReader
- public attachToPreprocessor
- public finishedMainFile
- public getDependencies
- public maybeAddDependency
- public needSystemDependencies
- public sawDependency
Methods
¶DependencyFileGenerator(
const clang::DependencyOutputOptions& Opts)
DependencyFileGenerator(
const clang::DependencyOutputOptions& Opts)
Declared at: clang/include/clang/Frontend/Utils.h:104
Parameters
- const clang::DependencyOutputOptions& Opts
¶void attachToPreprocessor(clang::Preprocessor& PP)
void attachToPreprocessor(clang::Preprocessor& PP)
Declared at: clang/include/clang/Frontend/Utils.h:106
Parameters
¶void finishedMainFile(
clang::DiagnosticsEngine& Diags)
void finishedMainFile(
clang::DiagnosticsEngine& Diags)
Description
Called when the end of the main file is reached.
Declared at: clang/include/clang/Frontend/Utils.h:108
Parameters
- clang::DiagnosticsEngine& Diags
¶bool needSystemDependencies()
bool needSystemDependencies()
Description
Return true if system files should be passed to sawDependency().
Declared at: clang/include/clang/Frontend/Utils.h:110
¶void outputDependencyFile(llvm::raw_ostream& OS)
void outputDependencyFile(llvm::raw_ostream& OS)
Declared at: clang/include/clang/Frontend/Utils.h:116
Parameters
¶void outputDependencyFile(
clang::DiagnosticsEngine& Diags)
void outputDependencyFile(
clang::DiagnosticsEngine& Diags)
Declared at: clang/include/clang/Frontend/Utils.h:119
Parameters
- clang::DiagnosticsEngine& Diags
¶bool sawDependency(llvm::StringRef Filename,
bool FromModule,
bool IsSystem,
bool IsModuleFile,
bool IsMissing)
bool sawDependency(llvm::StringRef Filename,
bool FromModule,
bool IsSystem,
bool IsModuleFile,
bool IsMissing)
Description
Called when a new file is seen. Return true if \p Filename should be added to the list of dependencies. The default implementation ignores <built -in> and system files.
Declared at: clang/include/clang/Frontend/Utils.h:112
Parameters
- llvm::StringRef Filename
- bool FromModule
- bool IsSystem
- bool IsModuleFile
- bool IsMissing