clang
3.9.0
|
Collects the dependencies for imported modules into a directory. More...
#include <Utils.h>
Public Member Functions | |
StringRef | getDest () |
bool | insertSeen (StringRef Filename) |
void | addFile (StringRef Filename) |
void | addFileMapping (StringRef VPath, StringRef RPath) |
void | attachToPreprocessor (Preprocessor &PP) override |
void | attachToASTReader (ASTReader &R) override |
void | writeFileMap () |
bool | hasErrors () |
ModuleDependencyCollector (std::string DestDir) | |
~ModuleDependencyCollector () | |
![]() | |
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... | |
Collects the dependencies for imported modules into a directory.
Users should attach to the AST reader whenever a module is loaded.
|
inline |
|
inline |
Definition at line 147 of file Utils.h.
References writeFileMap().
void ModuleDependencyCollector::addFile | ( | StringRef | Filename | ) |
Definition at line 221 of file ModuleDependencyCollector.cpp.
References insertSeen().
|
inline |
Definition at line 136 of file Utils.h.
References clang::vfs::YAMLVFSWriter::addFileMapping().
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 101 of file ModuleDependencyCollector.cpp.
References clang::ASTReader::addListener().
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 105 of file ModuleDependencyCollector.cpp.
References clang::ModuleMap::addModuleMapCallbacks(), clang::Preprocessor::getHeaderSearchInfo(), and clang::HeaderSearch::getModuleMap().
|
inline |
Definition at line 133 of file Utils.h.
Referenced by writeFileMap().
|
inline |
void ModuleDependencyCollector::writeFileMap | ( | ) |
Definition at line 128 of file ModuleDependencyCollector.cpp.
References getDest(), isCaseSensitivePath(), clang::vfs::YAMLVFSWriter::setCaseSensitivity(), clang::vfs::YAMLVFSWriter::setOverlayDir(), clang::vfs::YAMLVFSWriter::setUseExternalNames(), and clang::vfs::YAMLVFSWriter::write().
Referenced by ~ModuleDependencyCollector().