Interface for virtualized outputs.

Synopsis

Declared in <llvm/Support/VirtualOutputBackend.h>

class OutputBackend
    : public RefCountedBase<OutputBackend>

Description

If virtual functions are added here, also add them to ProxyOutputBackend.

Base Classes

Name

Description

RefCountedBase<OutputBackend>

A CRTP mixin class that adds reference counting to a type.

Member Functions

Name

Description

~OutputBackend [destructor] [virtual]

Destructor

Release

Decrement the reference count; delete the object when it reaches zero.

Retain

Increment the reference count.

UseCount

Return the current reference count.

clone

Get a backend that points to the same destination as this one but that has independent settings.

createFile

Create a file. If Config is std::nullopt, uses the backend's default OutputConfig (may match OutputConfig::OutputConfig(), or may have been customized).

Protected Member Functions

Name

Description

OutputBackend [constructor]

Default constructor

operator= [deleted]

Copy assignment is deleted; reference counts are not copied.

cloneImpl [virtual]

Must be thread‐safe. Virtual function has a different name than clone() so that implementations can override the return value.

createFileImpl [virtual]

Create a file for Path. Must be thread‐safe.

Non-Member Functions

Name

Description

makeFilteringOutputBackend

Make a backend where OutputBackend::createFile() forwards to UnderlyingBackend when Filter is true, and otherwise returns a NullOutput.

makeMirroringOutputBackend

Create a backend that forwards OutputBackend::createFile() to both Backend1 and Backend2. Writing to such backend will create identical outputs using two different backends.

makeNullOutputBackend

Create a backend that ignores all output.

Derived Classes

Name

Description

HashingOutputBackend

An output backend that only generates the hash for outputs.

OnDiskOutputBackend

An output backend that creates files on disk, wrapping APIs in sys::fs.

ProxyOutputBackend

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

Created with MrDocs