13 #ifndef LLVM_SUPPORT_FILEOUTPUTBUFFER_H 14 #define LLVM_SUPPORT_FILEOUTPUTBUFFER_H virtual ~FileOutputBuffer()
If this object was previously committed, the destructor just deletes this object. ...
virtual uint8_t * getBufferEnd() const =0
Returns a pointer to the end of the buffer.
static Expected< std::unique_ptr< FileOutputBuffer > > create(StringRef FilePath, size_t Size, unsigned Flags=0)
Factory method to create an OutputBuffer object which manages a read/write buffer of the specified si...
This class represents lattice values for constants.
StringRef getPath() const
Returns path where file will show up if buffer is committed.
FileOutputBuffer(StringRef Path)
set the 'x' bit on the resulting file
virtual uint8_t * getBufferStart() const =0
Returns a pointer to the start of the buffer.
FileOutputBuffer - This interface provides simple way to create an in-memory buffer which will be wri...
Tagged union holding either a T or a Error.
virtual size_t getBufferSize() const =0
Returns size of the buffer.
Don't use mmap and instead write an in-memory buffer to a file when this buffer is closed...
virtual void discard()
This removes the temporary file (unless it already was committed) but keeps the memory mapping alive...
Lightweight error class with error context and mandatory checking.
virtual Error commit()=0
Flushes the content of the buffer to its file and deallocates the buffer.
StringRef - Represent a constant reference to a string, i.e.