[#llvm-CachedFileStream] = xref:llvm.adoc[llvm]::CachedFileStream :relfileprefix: ../ :mrdocs: This class wraps an output stream for a file. == Synopsis Declared in `<llvm/Support/Caching.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class CachedFileStream; ---- == Description 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. == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/CachedFileStream/2constructor.adoc[`CachedFileStream`] [.small]#[constructor]# | Construct a cached file stream wrapping `OS.` | xref:llvm/CachedFileStream/2destructor.adoc[`~CachedFileStream`] [.small]#[destructor]# [.small]#[virtual]# | Destroy the stream, aborting if commit() was never called. | xref:llvm/CachedFileStream/commit.adoc[`commit`] [.small]#[virtual]# | Must be called exactly once after the writes to OS have been completed but before the CachedFileStream object is destroyed. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/CachedFileStream/Committed.adoc[`Committed`] | Whether commit() has already been called. | xref:llvm/CachedFileStream/OS.adoc[`OS`] | Stream to write the file contents to. | xref:llvm/CachedFileStream/ObjectPathName.adoc[`ObjectPathName`] | Path of the object file associated with this stream. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#