LLVM 22.0.0git
|
Namespaces | |
namespace | detail |
Classes | |
class | directory_entry |
A member of a directory, yielded by a directory_iterator. More... | |
class | directory_iterator |
An input iterator over the entries in a virtual path, similar to llvm::sys::fs::directory_iterator. More... | |
class | File |
Represents an open file. More... | |
class | FileSystem |
The virtual file system interface. More... | |
class | HashingOutputBackend |
An output backend that only generates the hash for outputs. More... | |
class | HashingOutputFile |
HashingOutputFile. More... | |
class | HashingStream |
raw_pwrite_stream that writes to a hasher. More... | |
class | InMemoryFileSystem |
An in-memory file system. More... | |
class | NullOutputFileImpl |
class | OnDiskOutputBackend |
An output backend that creates files on disk, wrapping APIs in sys::fs. More... | |
class | OutputBackend |
Interface for virtualized outputs. More... | |
struct | OutputConfig |
Full configuration for an output for use by the OutputBackend. More... | |
class | OutputConfigError |
Error related to an OutputConfig for an OutputFile. More... | |
class | OutputError |
Error related to an OutputFile. More... | |
class | OutputFile |
A virtualized output file that writes to a specific backend. More... | |
class | OutputFileImpl |
class | OverlayFileSystem |
A file system that allows overlaying one AbstractFileSystem on top of another. More... | |
class | ProxyFileSystem |
By default, this delegates all calls to the underlying file system. More... | |
class | ProxyOutputBackend |
A helper class for proxying another backend, with the default implementation to forward to the underlying backend. More... | |
class | recursive_directory_iterator |
An input iterator over the recursive contents of a virtual path, similar to llvm::sys::fs::recursive_directory_iterator. More... | |
class | RedirectingFileSystem |
A virtual file system parsed from a YAML file. More... | |
class | RedirectingFileSystemParser |
A helper class to hold the common YAML parsing state. More... | |
class | RedirectingFSDirIterImpl |
Directory iterator implementation for RedirectingFileSystem's directory entries. More... | |
class | Status |
The result of a status operation. More... | |
class | TempFileOutputError |
Error related to a temporary file for an OutputFile. More... | |
class | TracingFileSystem |
File system that tracks the number of calls to the underlying file system. More... | |
struct | YAMLVFSEntry |
class | YAMLVFSWriter |
Enumerations | |
enum class | OutputErrorCode { not_closed = 1 , invalid_config , already_closed , has_open_proxy } |
Functions | |
LLVM_ABI IntrusiveRefCntPtr< FileSystem > | getRealFileSystem () |
Gets an vfs::FileSystem for the 'real' file system, as seen by the operating system. | |
LLVM_ABI std::unique_ptr< FileSystem > | createPhysicalFileSystem () |
Create an vfs::FileSystem for the 'real' file system, as seen by the operating system. | |
LLVM_ABI llvm::sys::fs::UniqueID | getNextVirtualUniqueID () |
Get a globally unique ID for a virtual file or directory. | |
LLVM_ABI std::unique_ptr< FileSystem > | getVFSFromYAML (std::unique_ptr< llvm::MemoryBuffer > Buffer, llvm::SourceMgr::DiagHandlerTy DiagHandler, StringRef YAMLFilePath, void *DiagContext=nullptr, IntrusiveRefCntPtr< FileSystem > ExternalFS=getRealFileSystem()) |
Gets a FileSystem for a virtual file system described in YAML format. | |
void | collectVFSEntries (RedirectingFileSystem &VFS, SmallVectorImpl< YAMLVFSEntry > &CollectedEntries) |
Collect all pairs of <virtual path, real path> entries from the VFS . | |
IntrusiveRefCntPtr< OutputBackend > | makeNullOutputBackend () |
Create a backend that ignores all output. | |
IntrusiveRefCntPtr< OutputBackend > | makeFilteringOutputBackend (IntrusiveRefCntPtr< OutputBackend > UnderlyingBackend, std::function< bool(StringRef, std::optional< OutputConfig >)> Filter) |
Make a backend where OutputBackend::createFile() forwards to UnderlyingBackend when Filter is true, and otherwise returns a NullOutput. | |
IntrusiveRefCntPtr< OutputBackend > | makeMirroringOutputBackend (IntrusiveRefCntPtr< OutputBackend > Backend1, IntrusiveRefCntPtr< OutputBackend > Backend2) |
Create a backend that forwards OutputBackend::createFile() to both Backend1 and Backend2 . | |
const std::error_category & | output_category () |
std::error_code | make_error_code (OutputErrorCode EV) |
Error | convertToOutputError (const Twine &OutputPath, std::error_code EC) |
Return Error::success() or use OutputPath to create an OutputError, depending on EC . | |
Error | convertToTempFileOutputError (const Twine &TempPath, const Twine &OutputPath, std::error_code EC) |
Return Error::success() or use TempPath and OutputPath to create a TempFileOutputError, depending on EC . | |
void | consumeDiscardOnDestroy (OutputFile &File) |
Update File to silently discard itself if it's still open when it's destroyed. | |
Expected< OutputFile > | consumeDiscardOnDestroy (Expected< OutputFile > File) |
Update File to silently discard itself if it's still open when it's destroyed. | |
static sys::fs::UniqueID | getUniqueID (hash_code Hash) |
static sys::fs::UniqueID | getFileID (sys::fs::UniqueID Parent, llvm::StringRef Name, llvm::StringRef Contents) |
static sys::fs::UniqueID | getDirectoryID (sys::fs::UniqueID Parent, llvm::StringRef Name) |
|
strong |
Enumerator | |
---|---|
not_closed | |
invalid_config | |
already_closed | |
has_open_proxy |
Definition at line 24 of file VirtualOutputError.h.
void llvm::vfs::collectVFSEntries | ( | RedirectingFileSystem & | VFS, |
SmallVectorImpl< YAMLVFSEntry > & | CollectedEntries ) |
Collect all pairs of <virtual path, real path> entries from the VFS
.
This is used by the module dependency collector to forward the entries into the reproducer output VFS YAML file.
Definition at line 2710 of file VirtualFileSystem.cpp.
References getVFSEntries(), llvm::vfs::RedirectingFileSystem::lookupPath(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
inline |
Update File
to silently discard itself if it's still open when it's destroyed.
Definition at line 161 of file VirtualOutputFile.h.
References consumeDiscardOnDestroy().
|
inline |
Update File
to silently discard itself if it's still open when it's destroyed.
Definition at line 155 of file VirtualOutputFile.h.
References llvm::consumeError().
Referenced by consumeDiscardOnDestroy().
Return Error::success() or use OutputPath
to create an OutputError, depending on EC
.
Definition at line 65 of file VirtualOutputError.h.
References llvm::make_error(), and llvm::Error::success().
Referenced by areFilesDifferent(), and llvm::vfs::OnDiskOutputBackend::makeAbsolute().
|
inline |
Return Error::success() or use TempPath
and OutputPath
to create a TempFileOutputError, depending on EC
.
Definition at line 120 of file VirtualOutputError.h.
References llvm::make_error(), and llvm::Error::success().
std::unique_ptr< FileSystem > llvm::vfs::createPhysicalFileSystem | ( | ) |
Create an vfs::FileSystem
for the 'real' file system, as seen by the operating system.
It has its own working directory, independent of (but initially equal to) that of the process.
Definition at line 405 of file VirtualFileSystem.cpp.
|
static |
Definition at line 824 of file VirtualFileSystem.cpp.
References llvm::sys::fs::UniqueID::getFile(), getUniqueID(), and llvm::hash_combine().
Referenced by llvm::vfs::InMemoryFileSystem::InMemoryFileSystem(), and llvm::vfs::detail::NewInMemoryNodeInfo::makeStatus().
|
static |
Definition at line 819 of file VirtualFileSystem.cpp.
References llvm::sys::fs::UniqueID::getFile(), getUniqueID(), and llvm::hash_combine().
Referenced by llvm::vfs::detail::NewInMemoryNodeInfo::makeStatus().
UniqueID llvm::vfs::getNextVirtualUniqueID | ( | ) |
Get a globally unique ID for a virtual file or directory.
Definition at line 2720 of file VirtualFileSystem.cpp.
Referenced by llvm::vfs::RedirectingFileSystemParser::lookupOrCreateEntry().
IntrusiveRefCntPtr< FileSystem > llvm::vfs::getRealFileSystem | ( | ) |
Gets an vfs::FileSystem
for the 'real' file system, as seen by the operating system.
The working directory is linked to the process's working directory. (This is usually thread-hostile).
Definition at line 399 of file VirtualFileSystem.cpp.
References llvm::makeIntrusiveRefCnt().
Referenced by llvm::OverlapStats::accumulateCounts(), llvm::FileCollectorBase::addDirectory(), llvm::DataFlowSanitizerPass::DataFlowSanitizerPass(), llvm::CodeGenData::getInstance(), llvm::MemProfUsePass::MemProfUsePass(), llvm::MIRProfileLoaderPass::MIRProfileLoaderPass(), llvm::PGOInstrumentationUse::PGOInstrumentationUse(), llvm::SampleProfileLoaderPass::run(), llvm::SanitizerBinaryMetadataPass::run(), and llvm::SanitizerCoveragePass::SanitizerCoveragePass().
|
static |
Definition at line 815 of file VirtualFileSystem.cpp.
Referenced by getDirectoryID(), and getFileID().
LLVM_ABI std::unique_ptr< FileSystem > llvm::vfs::getVFSFromYAML | ( | std::unique_ptr< llvm::MemoryBuffer > | Buffer, |
llvm::SourceMgr::DiagHandlerTy | DiagHandler, | ||
StringRef | YAMLFilePath, | ||
void * | DiagContext = nullptr, | ||
IntrusiveRefCntPtr< FileSystem > | ExternalFS = getRealFileSystem() ) |
Gets a FileSystem
for a virtual file system described in YAML format.
References DiagHandler().
|
inline |
Definition at line 32 of file VirtualOutputError.h.
References output_category().
Referenced by llvm::vfs::InMemoryFileSystem::dir_begin(), llvm::vfs::RedirectingFileSystem::lookupPath(), llvm::vfs::InMemoryFileSystem::openFileForRead(), llvm::vfs::OverlayFileSystem::openFileForRead(), llvm::vfs::RedirectingFileSystem::openFileForRead(), llvm::vfs::OutputError::OutputError(), and llvm::vfs::OverlayFileSystem::status().
IntrusiveRefCntPtr< OutputBackend > llvm::vfs::makeFilteringOutputBackend | ( | IntrusiveRefCntPtr< OutputBackend > | UnderlyingBackend, |
std::function< bool(StringRef, std::optional< OutputConfig >)> | Filter ) |
Make a backend where OutputBackend::createFile() forwards to UnderlyingBackend
when Filter
is true, and otherwise returns a NullOutput.
Definition at line 49 of file VirtualOutputBackends.cpp.
References assert(), llvm::vfs::ProxyOutputBackend::createFileImpl(), llvm::Filter, and llvm::makeIntrusiveRefCnt().
IntrusiveRefCntPtr< OutputBackend > llvm::vfs::makeMirroringOutputBackend | ( | IntrusiveRefCntPtr< OutputBackend > | Backend1, |
IntrusiveRefCntPtr< OutputBackend > | Backend2 ) |
Create a backend that forwards OutputBackend::createFile() to both Backend1
and Backend2
.
Writing to such backend will create identical outputs using two different backends.
Definition at line 81 of file VirtualOutputBackends.cpp.
References assert(), llvm::consumeError(), llvm::raw_ostream::enable_colors(), llvm::isa(), llvm::joinErrors(), llvm::makeIntrusiveRefCnt(), llvm::Offset, llvm::vfs::ProxyOutputBackend::ProxyOutputBackend(), Ptr, llvm::Release, Retain, Size, and llvm::raw_ostream::write().
IntrusiveRefCntPtr< OutputBackend > llvm::vfs::makeNullOutputBackend | ( | ) |
Create a backend that ignores all output.
Definition at line 35 of file VirtualOutputBackends.cpp.
References llvm::makeIntrusiveRefCnt().
const std::error_category & llvm::vfs::output_category | ( | ) |
Definition at line 50 of file VirtualOutputError.cpp.
References const, and output_category().
Referenced by make_error_code(), and output_category().