clang API Documentation
#include <Utils.h>
Public Member Functions | |
| void | attachToPreprocessor (Preprocessor &PP) |
| void | attachToASTReader (ASTReader &R) |
| llvm::ArrayRef< std::string > | getDependencies () const |
| virtual bool | sawDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) |
| virtual void | finishedMainFile () |
| Called when the end of the main file is reached. | |
| virtual bool | needSystemDependencies () |
| Return true if system files should be passed to sawDependency(). | |
| virtual | ~DependencyCollector () |
| void | maybeAddDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) |
An interface for collecting the dependencies of a compilation. Users should use attachToPreprocessor and attachToASTReader to get all of the dependencies.
| DependencyCollector::~DependencyCollector | ( | ) | [virtual] |
Definition at line 131 of file DependencyFile.cpp.
| void DependencyCollector::attachToASTReader | ( | ASTReader & | R | ) |
Definition at line 136 of file DependencyFile.cpp.
References clang::ASTReader::addListener().
| void DependencyCollector::attachToPreprocessor | ( | Preprocessor & | PP | ) |
Definition at line 132 of file DependencyFile.cpp.
References clang::Preprocessor::addPPCallbacks(), and clang::Preprocessor::getSourceManager().
| virtual void clang::DependencyCollector::finishedMainFile | ( | ) | [inline, virtual] |
| llvm::ArrayRef<std::string> clang::DependencyCollector::getDependencies | ( | ) | const [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 109 of file DependencyFile.cpp.
References sawDependency().
| virtual bool clang::DependencyCollector::needSystemDependencies | ( | ) | [inline, virtual] |
Return true if system files should be passed to sawDependency().
Definition at line 92 of file Utils.h.
Referenced by sawDependency().
| bool DependencyCollector::sawDependency | ( | StringRef | Filename, |
| bool | FromModule, | ||
| bool | IsSystem, | ||
| bool | IsModuleFile, | ||
| bool | IsMissing | ||
| ) | [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 124 of file DependencyFile.cpp.
References isSpecialFilename(), and needSystemDependencies().
Referenced by maybeAddDependency().