clang
7.0.0
|
Collects the dependencies for imported modules into a directory. More...
#include "clang/Frontend/Utils.h"
Public Member Functions | |
ModuleDependencyCollector (std::string DestDir) | |
~ModuleDependencyCollector () override | |
StringRef | getDest () |
bool | insertSeen (StringRef Filename) |
void | addFile (StringRef Filename, StringRef FileDst={}) |
void | addFileMapping (StringRef VPath, StringRef RPath) |
void | attachToPreprocessor (Preprocessor &PP) override |
void | attachToASTReader (ASTReader &R) override |
void | writeFileMap () |
bool | hasErrors () |
![]() | |
virtual | ~DependencyCollector () |
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... | |
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 |
|
inlineoverride |
void ModuleDependencyCollector::addFile | ( | StringRef | Filename, |
StringRef | FileDst = {} |
||
) |
Definition at line 259 of file ModuleDependencyCollector.cpp.
|
inline |
Definition at line 152 of file Utils.h.
References clang::vfs::YAMLVFSWriter::addFileMapping().
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 120 of file ModuleDependencyCollector.cpp.
References clang::ASTReader::addListener().
|
overridevirtual |
Reimplemented from clang::DependencyCollector.
Definition at line 124 of file ModuleDependencyCollector.cpp.
References clang::ModuleMap::addModuleMapCallbacks(), clang::Preprocessor::addPPCallbacks(), clang::Preprocessor::getHeaderSearchInfo(), clang::HeaderSearch::getModuleMap(), and clang::Preprocessor::getSourceManager().
|
inline |
|
inline |
Definition at line 160 of file Utils.h.
References clang::AttachDependencyGraphGen(), clang::AttachHeaderIncludeGen(), clang::CacheTokens(), clang::createChainedIncludesSource(), clang::createInvocationFromCommandLine(), clang::Default, clang::getLastArgIntValue(), and Id.
|
inline |
void ModuleDependencyCollector::writeFileMap | ( | ) |
Definition at line 149 of file ModuleDependencyCollector.cpp.
References isCaseSensitivePath(), real_path(), and clang::Result.