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
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index ea9b801..a91fe9b 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -456,6 +456,10 @@
// 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 @@
// 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 @@
// 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);
}