25void OutputFileImpl::anchor() {}
26void NullOutputFileImpl::anchor() {}
50 return std::make_unique<TrackedProxy>(OpenProxy,
getOS());
68 Error E = Impl->keep();
70 DiscardOnDestroyHandler =
nullptr;
85 OpenProxy->resetProxy();
87 Error E = Impl->discard();
89 DiscardOnDestroyHandler =
nullptr;
93void OutputFile::destroy() {
99 auto DiscardHandler = std::move(DiscardOnDestroyHandler);
101 assert(!Impl &&
"Expected discard to destroy Impl");
109 DiscardHandler(std::move(E));
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_UNLIKELY(EXPR)
This file contains the declarations of the OutputError class.
This file contains the declarations of the llvm::vfs::OutputFile class, which is a virtualized output...
TrackedProxy(TrackedProxy *&TrackingPointer, raw_pwrite_stream &OS)
TrackedProxy *& TrackingPointer
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
raw_pwrite_stream_proxy(raw_pwrite_stream &OS)
raw_pwrite_stream(bool Unbuffered=false, OStreamKind K=OStreamKind::OK_OStream)
StringRef getPath() const
raw_pwrite_stream & getOS()
LLVM_ABI Expected< std::unique_ptr< raw_pwrite_stream > > createProxy()
Create a proxy stream for clients that need to pass an owned stream to a producer.
LLVM_ABI Error discard()
Discard an output, cleaning up any temporary state.
LLVM_ABI Error keep()
Keep an output.
This is an optimization pass for GlobalISel generic memory operations.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.