15 #ifndef LLVM_SUPPORT_CIRCULAR_RAW_OSTREAM_H
16 #define LLVM_SUPPORT_CIRCULAR_RAW_OSTREAM_H
77 TheStream->
write(Cur, BufferArray + BufferSize - Cur);
79 TheStream->
write(BufferArray, Cur - BufferArray);
84 virtual void write_impl(
const char *Ptr,
size_t Size)
LLVM_OVERRIDE;
114 BufferSize(BuffSize),
119 BufferArray =
new char[BufferSize];
137 delete[] BufferArray;
161 void releaseStream() {
circular_raw_ostream(raw_ostream &Stream, const char *Header, size_t BuffSize=0, bool Owns=REFERENCE_ONLY)
uint64_t tell() const
tell - Return the current offset with the file.
void setStream(raw_ostream &Stream, bool Owns=REFERENCE_ONLY)
raw_ostream & write(unsigned char C)
void flushBufferWithBanner()
static const bool REFERENCE_ONLY
static const bool TAKE_OWNERSHIP
size_t GetNumBytesInBuffer() const