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

Synopsis

Declared in <llvm/Support/VirtualOutputBackends.h>

IntrusiveRefCntPtr<OutputBackend>
makeFilteringOutputBackend(
    IntrusiveRefCntPtr<OutputBackend> UnderlyingBackend,
    std::function<bool(StringRef, std::optional<OutputConfig>)> Filter);

Return Value

A filtering backend wrapping UnderlyingBackend.

Parameters

Name

Description

UnderlyingBackend

Backend that receives createFile() when the filter accepts the path.

Filter

Predicate that returns true when UnderlyingBackend should handle the file.

Created with MrDocs