FileOutputBuffer - This interface provides simple way to create an in-memory buffer which will be written to a file. During the lifetime of these objects, the content or existence of the specified file is undefined. That is, creating an OutputBuffer for a file may immediately remove the file. If the FileOutputBuffer is committed, the target file's content will become the buffer content at the time of the commit. If the FileOutputBuffer is not committed, the file will be deleted in the FileOutputBuffer destructor.
Declared in <llvm/Support/FileOutputBuffer.h>
class FileOutputBuffer;
| Name |
|---|
Unnamed enum |
| Name | Description |
|---|---|
~FileOutputBuffer [destructor] [virtual] | If this object was previously committed, the destructor just deletes this object. If this object was not committed, the destructor deallocates the buffer and the target file is never written. |
commit [virtual] | Flushes the content of the buffer to its file and deallocates the buffer. If commit() is not called before this object's destructor is called, the file is deleted in the destructor. The optional parameter is used if it turns out you want the file size to be smaller than initially requested. |
discard [virtual] | This removes the temporary file (unless it already was committed) but keeps the memory mapping alive. |
getBufferEnd [virtual] | Returns a pointer to the end of the buffer. |
getBufferSize [virtual] | Returns size of the buffer. |
getBufferStart [virtual] | Returns a pointer to the start of the buffer. |
getPath | Returns path where file will show up if buffer is committed. |
| Name | Description |
|---|---|
create | Factory method to create an OutputBuffer object which manages a read/write buffer of the specified size. When committed, the buffer will be written to the file at the specified path. |
| Name | Description |
|---|---|
FileOutputBuffer [constructor] | Construct from StringRef |
| Name |
|---|
FinalPath |