aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/FormattedStream.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-12 20:52:45 +0000
committerDan Gohman <gohman@apple.com>2009-08-12 20:52:45 +0000
commitf3e488476e1bdfe9de6daddcd1cd452c9d874b56 (patch)
tree179c738c6b6b149a6b4462f49f3758e485b8980b /include/llvm/Support/FormattedStream.h
parent114a266c942ac2dc1e98047a00337ecbc81f7380 (diff)
downloadexternal_llvm-f3e488476e1bdfe9de6daddcd1cd452c9d874b56.zip
external_llvm-f3e488476e1bdfe9de6daddcd1cd452c9d874b56.tar.gz
external_llvm-f3e488476e1bdfe9de6daddcd1cd452c9d874b56.tar.bz2
Add a GetBufferSize() member to raw_ostream and use it to
simplify some formatted_raw_ostream code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FormattedStream.h')
-rw-r--r--include/llvm/Support/FormattedStream.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Support/FormattedStream.h b/include/llvm/Support/FormattedStream.h
index 8d6dca6..11a0e18 100644
--- a/include/llvm/Support/FormattedStream.h
+++ b/include/llvm/Support/FormattedStream.h
@@ -116,8 +116,7 @@ namespace llvm
// own buffering, and it doesn't need or want TheStream to do another
// layer of buffering underneath. Resize the buffer to what TheStream
// had been using, and tell TheStream not to do its own buffering.
- TheStream->flush();
- if (size_t BufferSize = TheStream->GetNumBytesInBuffer())
+ if (size_t BufferSize = TheStream->GetBufferSize())
SetBufferSize(BufferSize);
TheStream->SetUnbuffered();