clang  8.0.0svn
Public Member Functions | List of all members
clang::ModuleDependencyCollector Class Reference

Collects the dependencies for imported modules into a directory. More...

#include "clang/Frontend/Utils.h"

Inheritance diagram for clang::ModuleDependencyCollector:
Inheritance graph
Collaboration diagram for clang::ModuleDependencyCollector:
Collaboration graph

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 ()
- Public Member Functions inherited from clang::DependencyCollector
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...

Detailed Description

Collects the dependencies for imported modules into a directory.

Users should attach to the AST reader whenever a module is loaded.

Definition at line 133 of file Utils.h.

Constructor & Destructor Documentation

◆ ModuleDependencyCollector()

clang::ModuleDependencyCollector::ModuleDependencyCollector ( std::string  DestDir)

Definition at line 144 of file Utils.h.

◆ ~ModuleDependencyCollector()

clang::ModuleDependencyCollector::~ModuleDependencyCollector ( )

Definition at line 146 of file Utils.h.

Member Function Documentation

◆ addFile()

void ModuleDependencyCollector::addFile ( StringRef  Filename,
StringRef  FileDst = {} 

Definition at line 255 of file ModuleDependencyCollector.cpp.

◆ addFileMapping()

void clang::ModuleDependencyCollector::addFileMapping ( StringRef  VPath,
StringRef  RPath 

Definition at line 152 of file Utils.h.

◆ attachToASTReader()

void ModuleDependencyCollector::attachToASTReader ( ASTReader R)

Reimplemented from clang::DependencyCollector.

Definition at line 120 of file ModuleDependencyCollector.cpp.

References clang::ASTReader::addListener().

◆ attachToPreprocessor()

void ModuleDependencyCollector::attachToPreprocessor ( Preprocessor PP)

◆ getDest()

StringRef clang::ModuleDependencyCollector::getDest ( )

Definition at line 148 of file Utils.h.

◆ hasErrors()

bool clang::ModuleDependencyCollector::hasErrors ( )

◆ insertSeen()

bool clang::ModuleDependencyCollector::insertSeen ( StringRef  Filename)

Definition at line 149 of file Utils.h.

References Filename.

◆ writeFileMap()

void ModuleDependencyCollector::writeFileMap ( )

Definition at line 149 of file ModuleDependencyCollector.cpp.

References isCaseSensitivePath(), real_path(), and clang::Result.

The documentation for this class was generated from the following files: