LLVM  14.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::FileCollectorBase Class Referenceabstract

#include "llvm/Support/FileCollector.h"

Inheritance diagram for llvm::FileCollectorBase:
Inheritance graph
[legend]
Collaboration diagram for llvm::FileCollectorBase:
Collaboration graph
[legend]

Public Member Functions

 FileCollectorBase ()
 
virtual ~FileCollectorBase ()
 
void addFile (const Twine &file)
 
void addDirectory (const Twine &Dir)
 

Protected Member Functions

bool markAsSeen (StringRef Path)
 
virtual void addFileImpl (StringRef SrcPath)=0
 
virtual llvm::vfs::directory_iterator addDirectoryImpl (const llvm::Twine &Dir, IntrusiveRefCntPtr< vfs::FileSystem > FS, std::error_code &EC)=0
 

Protected Attributes

std::mutex Mutex
 Synchronizes access to internal data structures. More...
 
StringSet Seen
 Tracks already seen files so they can be skipped. More...
 

Detailed Description

Definition at line 23 of file FileCollector.h.

Constructor & Destructor Documentation

◆ FileCollectorBase()

FileCollectorBase::FileCollectorBase ( )
default

◆ ~FileCollectorBase()

FileCollectorBase::~FileCollectorBase ( )
virtualdefault

Member Function Documentation

◆ addDirectory()

void FileCollectorBase::addDirectory ( const Twine Dir)

◆ addDirectoryImpl()

virtual llvm::vfs::directory_iterator llvm::FileCollectorBase::addDirectoryImpl ( const llvm::Twine Dir,
IntrusiveRefCntPtr< vfs::FileSystem FS,
std::error_code &  EC 
)
protectedpure virtual

Implemented in llvm::FileCollector.

Referenced by addDirectory().

◆ addFile()

void FileCollectorBase::addFile ( const Twine file)

Definition at line 21 of file FileCollector.cpp.

References addFileImpl(), File, and markAsSeen().

Referenced by llvm::FileCollector::addDirectoryImpl().

◆ addFileImpl()

virtual void llvm::FileCollectorBase::addFileImpl ( StringRef  SrcPath)
protectedpure virtual

Implemented in llvm::FileCollector.

Referenced by addFile().

◆ markAsSeen()

bool llvm::FileCollectorBase::markAsSeen ( StringRef  Path)
inlineprotected

Definition at line 32 of file FileCollector.h.

References llvm::StringRef::empty(), llvm::StringSet< AllocatorTy >::insert(), and Seen.

Referenced by addFile().

Member Data Documentation

◆ Mutex

std::mutex llvm::FileCollectorBase::Mutex
protected

Synchronizes access to internal data structures.

Definition at line 46 of file FileCollector.h.

◆ Seen

StringSet llvm::FileCollectorBase::Seen
protected

Tracks already seen files so they can be skipped.

Definition at line 49 of file FileCollector.h.

Referenced by markAsSeen().


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