diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-18 20:07:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-18 20:07:36 +0000 |
commit | 35979c021e4789b915cd569145bd9fb9ae0d8d8b (patch) | |
tree | c7247fb85a8f45a0ca10e5a6a1030ee7323bceb4 /lib/Support/raw_ostream.cpp | |
parent | 651aa689cc37d5932fac0e096aa8b536f282aa21 (diff) |
Revert r78924, disabling buffering defeats all the fast paths in raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/raw_ostream.cpp')
-rw-r--r-- | lib/Support/raw_ostream.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index ea9b801f18..a91fe9b536 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -456,6 +456,10 @@ raw_ostream &llvm::nulls() { // raw_os_ostream //===----------------------------------------------------------------------===// +raw_os_ostream::~raw_os_ostream() { + flush(); +} + void raw_os_ostream::write_impl(const char *Ptr, size_t Size) { OS.write(Ptr, Size); } @@ -470,6 +474,10 @@ uint64_t raw_os_ostream::tell() { // raw_string_ostream //===----------------------------------------------------------------------===// +raw_string_ostream::~raw_string_ostream() { + flush(); +} + void raw_string_ostream::write_impl(const char *Ptr, size_t Size) { OS.append(Ptr, Size); } @@ -478,6 +486,10 @@ void raw_string_ostream::write_impl(const char *Ptr, size_t Size) { // raw_svector_ostream //===----------------------------------------------------------------------===// +raw_svector_ostream::~raw_svector_ostream() { + flush(); +} + void raw_svector_ostream::write_impl(const char *Ptr, size_t Size) { OS.append(Ptr, Ptr + Size); } |