22#ifndef LLVM_SUPPORT_VIRTUALOUTPUTBACKENDS_H
23#define LLVM_SUPPORT_VIRTUALOUTPUTBACKENDS_H
38 IntrusiveRefCntPtr<OutputBackend> UnderlyingBackend,
39 std::function<
bool(StringRef, std::optional<OutputConfig>)>
Filter);
44IntrusiveRefCntPtr<OutputBackend>
46 IntrusiveRefCntPtr<OutputBackend> Backend2);
51 void anchor()
override;
61 if (
Error E = UnderlyingBackend->createFile(Path, Config).moveInto(
File))
63 return File.takeImpl();
70 : UnderlyingBackend(
std::
move(UnderlyingBackend)) {
71 assert(this->UnderlyingBackend &&
"Expected non-null backend");
80 void anchor()
override;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.
This file contains the declarations of the VirtualOutputBackend class, which can be used to virtualiz...
This file contains the declarations of the OutputConfig class.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
IntrusiveRefCntPtr< OnDiskOutputBackend > clone() const
Expected< std::unique_ptr< OutputFileImpl > > createFileImpl(StringRef Path, std::optional< OutputConfig > Config) override
Create a file for Path.
IntrusiveRefCntPtr< OutputBackend > cloneImpl() const override
Must be thread-safe.
OnDiskOutputBackend()=default
OutputSettings Settings
Settings for this backend.
Error makeAbsolute(SmallVectorImpl< char > &Path) const
Resolve an absolute path.
A virtualized output file that writes to a specific backend.
OutputBackend & getUnderlyingBackend() const
ProxyOutputBackend(IntrusiveRefCntPtr< OutputBackend > UnderlyingBackend)
Expected< std::unique_ptr< OutputFileImpl > > createFileImpl(StringRef Path, std::optional< OutputConfig > Config) override
Create a file for Path.
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,...
IntrusiveRefCntPtr< OutputBackend > makeMirroringOutputBackend(IntrusiveRefCntPtr< OutputBackend > Backend1, IntrusiveRefCntPtr< OutputBackend > Backend2)
Create a backend that forwards OutputBackend::createFile() to both Backend1 and Backend2.
IntrusiveRefCntPtr< T > makeIntrusiveRefCnt(Args &&...A)
Factory function for creating intrusive ref counted pointers.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
OutputConfig DefaultConfig
bool RemoveOnSignal
Register output files to be deleted if a signal is received.
bool UseTemporaries
Use temporary files.
Full configuration for an output for use by the OutputBackend.