From 48916523f53a54ce5468b133547dc25625515527 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 13 Aug 2009 15:58:55 +0000 Subject: Move SetBufferSize and SetUnbuffered out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78909 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/raw_ostream.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'include/llvm/Support') diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h index 58de3e8..82520ce 100644 --- a/include/llvm/Support/raw_ostream.h +++ b/include/llvm/Support/raw_ostream.h @@ -94,17 +94,7 @@ public: /// SetBufferSize - Set the internal buffer size to the specified amount /// instead of the default. - void SetBufferSize(size_t Size=4096) { - assert(Size >= 64 && - "Buffer size must be somewhat large for invariants to hold"); - flush(); - - delete [] OutBufStart; - OutBufStart = new char[Size]; - OutBufEnd = OutBufStart+Size; - OutBufCur = OutBufStart; - Unbuffered = false; - } + void SetBufferSize(size_t Size=4096); size_t GetBufferSize() const { return OutBufEnd - OutBufStart; @@ -114,13 +104,7 @@ public: /// unbuffered the stream will flush after every write. This routine /// will also flush the buffer immediately when the stream is being /// set to unbuffered. - void SetUnbuffered() { - flush(); - - delete [] OutBufStart; - OutBufStart = OutBufEnd = OutBufCur = 0; - Unbuffered = true; - } + void SetUnbuffered(); size_t GetNumBytesInBuffer() const { return OutBufCur - OutBufStart; -- cgit v1.1