clang
3.9.0
|
An interface for collecting the dependencies of a compilation. More...
#include <Utils.h>
Public Member Functions | |
virtual void | attachToPreprocessor (Preprocessor &PP) |
virtual void | attachToASTReader (ASTReader &R) |
llvm::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. More... | |
virtual void | finishedMainFile () |
Called when the end of the main file is reached. More... | |
virtual bool | needSystemDependencies () |
Return true if system files should be passed to sawDependency(). More... | |
virtual | ~DependencyCollector () |
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. More... | |
An interface for collecting the dependencies of a compilation.
Users should use attachToPreprocessor
and attachToASTReader
to get all of the dependencies. FIXME: Migrate DependencyFileGen and DependencyGraphGen to use this interface.
|
virtual |
Definition at line 140 of file DependencyFile.cpp.
|
virtual |
Reimplemented in clang::ModuleDependencyCollector.
Definition at line 147 of file DependencyFile.cpp.
References clang::ASTReader::addListener().
|
virtual |
Reimplemented in clang::ModuleDependencyCollector.
Definition at line 141 of file DependencyFile.cpp.
References clang::ModuleMap::addModuleMapCallbacks(), clang::Preprocessor::addPPCallbacks(), clang::Preprocessor::getHeaderSearchInfo(), clang::HeaderSearch::getModuleMap(), and clang::Preprocessor::getSourceManager().
|
inlinevirtual |
|
inline |
void DependencyCollector::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.
Definition at line 118 of file DependencyFile.cpp.
References sawDependency().
|
inlinevirtual |
Return true if system files should be passed to sawDependency().
Definition at line 94 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.
Definition at line 133 of file DependencyFile.cpp.
References isSpecialFilename(), and needSystemDependencies().
Referenced by maybeAddDependency().