LLVM 22.0.0git
llvm::vfs::ProxyOutputBackend Class Reference

A helper class for proxying another backend, with the default implementation to forward to the underlying backend. More...

#include "llvm/Support/VirtualOutputBackends.h"

Inheritance diagram for llvm::vfs::ProxyOutputBackend:
[legend]

Public Member Functions

 ProxyOutputBackend (IntrusiveRefCntPtr< OutputBackend > UnderlyingBackend)
Public Member Functions inherited from llvm::vfs::OutputBackend
IntrusiveRefCntPtr< OutputBackendclone () const
 Get a backend that points to the same destination as this one but that has independent settings.
Expected< OutputFilecreateFile (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

Protected Member Functions

Expected< std::unique_ptr< OutputFileImpl > > createFileImpl (StringRef Path, std::optional< OutputConfig > Config) override
 Create a file for Path.
OutputBackendgetUnderlyingBackend () const
Protected Member Functions inherited from llvm::vfs::OutputBackend
virtual IntrusiveRefCntPtr< OutputBackendcloneImpl () const =0
 Must be thread-safe.
 OutputBackend ()=default
Protected Member Functions inherited from llvm::RefCountedBase< OutputBackend >
 RefCountedBase ()=default
RefCountedBaseoperator= (const RefCountedBase &)=delete
 ~RefCountedBase ()

Detailed Description

A helper class for proxying another backend, with the default implementation to forward to the underlying backend.

Definition at line 50 of file VirtualOutputBackends.h.

Constructor & Destructor Documentation

◆ ProxyOutputBackend()

llvm::vfs::ProxyOutputBackend::ProxyOutputBackend ( IntrusiveRefCntPtr< OutputBackend > UnderlyingBackend)
inline

Definition at line 69 of file VirtualOutputBackends.h.

References assert(), and llvm::move().

Referenced by llvm::vfs::makeMirroringOutputBackend().

Member Function Documentation

◆ createFileImpl()

Expected< std::unique_ptr< OutputFileImpl > > llvm::vfs::ProxyOutputBackend::createFileImpl ( StringRef Path,
std::optional< OutputConfig > Config )
inlineoverrideprotectedvirtual

Create a file for Path.

Must be thread-safe.

Precondition
Config is valid or std::nullopt.

Implements llvm::vfs::OutputBackend.

Definition at line 59 of file VirtualOutputBackends.h.

References E().

Referenced by llvm::vfs::makeFilteringOutputBackend().

◆ getUnderlyingBackend()

OutputBackend & llvm::vfs::ProxyOutputBackend::getUnderlyingBackend ( ) const
inlineprotected

Definition at line 66 of file VirtualOutputBackends.h.

References llvm::vfs::OutputBackend::OutputBackend().


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