LLVM 22.0.0git
|
This class wraps an output stream for a file. More...
#include "llvm/Support/Caching.h"
Public Member Functions | |
CachedFileStream (std::unique_ptr< raw_pwrite_stream > OS, std::string OSPath="") | |
virtual Error | commit () |
Must be called exactly once after the writes to OS have been completed but before the CachedFileStream object is destroyed. | |
virtual | ~CachedFileStream () |
Public Attributes | |
bool | Committed = false |
std::unique_ptr< raw_pwrite_stream > | OS |
std::string | ObjectPathName |
This class wraps an output stream for a file.
Most clients should just be able to return an instance of this base class from the stream callback, but if a client needs to perform some action after the stream is written to, that can be done by deriving from this class and overriding the destructor or the commit() method.
|
inline |
|
inlinevirtual |
Definition at line 50 of file Caching.h.
References Committed, and llvm::report_fatal_error().
|
inlinevirtual |
Must be called exactly once after the writes to OS have been completed but before the CachedFileStream object is destroyed.
Definition at line 38 of file Caching.h.
References Committed, llvm::createStringError(), llvm::make_error_code(), and llvm::Error::success().
Referenced by llvm::localCache().
bool llvm::CachedFileStream::Committed = false |
Definition at line 47 of file Caching.h.
Referenced by commit(), and ~CachedFileStream().
std::unique_ptr<raw_pwrite_stream> llvm::CachedFileStream::OS |