LLVM 22.0.0git
|
An output backend that creates files on disk, wrapping APIs in sys::fs. More...
#include "llvm/Support/VirtualOutputBackends.h"
Classes | |
struct | OutputSettings |
On disk output settings. More... |
Public Member Functions | |
Error | makeAbsolute (SmallVectorImpl< char > &Path) const |
Resolve an absolute path. | |
IntrusiveRefCntPtr< OnDiskOutputBackend > | clone () const |
OnDiskOutputBackend ()=default | |
Public Member Functions inherited from llvm::vfs::OutputBackend | |
IntrusiveRefCntPtr< OutputBackend > | clone () const |
Get a backend that points to the same destination as this one but that has independent settings. | |
Expected< OutputFile > | createFile (const Twine &Path, std::optional< OutputConfig > Config=std::nullopt) |
Create a file. | |
virtual | ~OutputBackend ()=default |
Public Member Functions inherited from llvm::RefCountedBase< OutputBackend > | |
unsigned | UseCount () const |
void | Retain () const |
void | Release () const |
Public Attributes | |
OutputSettings | Settings |
Settings for this backend. |
Protected Member Functions | |
IntrusiveRefCntPtr< OutputBackend > | cloneImpl () const override |
Must be thread-safe. | |
Expected< std::unique_ptr< OutputFileImpl > > | createFileImpl (StringRef Path, std::optional< OutputConfig > Config) override |
Create a file for Path . | |
Protected Member Functions inherited from llvm::vfs::OutputBackend | |
OutputBackend ()=default | |
Protected Member Functions inherited from llvm::RefCountedBase< OutputBackend > | |
RefCountedBase ()=default | |
RefCountedBase & | operator= (const RefCountedBase &)=delete |
~RefCountedBase () |
An output backend that creates files on disk, wrapping APIs in sys::fs.
Definition at line 79 of file VirtualOutputBackends.h.
|
default |
|
inline |
Definition at line 108 of file VirtualOutputBackends.h.
References llvm::makeIntrusiveRefCnt(), and Settings.
Referenced by cloneImpl().
|
inlineoverrideprotectedvirtual |
Must be thread-safe.
Virtual function has a different name than clone() so that implementations can override the return value.
Implements llvm::vfs::OutputBackend.
Definition at line 83 of file VirtualOutputBackends.h.
References clone().
|
overrideprotectedvirtual |
Create a file for Path
.
Must be thread-safe.
Config
is valid or std::nullopt. Implements llvm::vfs::OutputBackend.
Definition at line 583 of file VirtualOutputBackends.cpp.
References makeAbsolute(), and Settings.
Error OnDiskOutputBackend::makeAbsolute | ( | SmallVectorImpl< char > & | Path | ) | const |
Resolve an absolute path.
Definition at line 577 of file VirtualOutputBackends.cpp.
References llvm::vfs::convertToOutputError(), and llvm::sys::fs::make_absolute().
Referenced by createFileImpl().
OutputSettings llvm::vfs::OnDiskOutputBackend::Settings |
Settings for this backend.
Access is not thread-safe.
Definition at line 119 of file VirtualOutputBackends.h.
Referenced by clone(), and createFileImpl().