it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77255
91177308-0d34-0410-b5e6-
96231b3b80d8
public:
explicit raw_null_ostream() {}
+ ~raw_null_ostream();
};
} // end llvm namespace
// raw_null_ostream
//===----------------------------------------------------------------------===//
+raw_null_ostream::~raw_null_ostream() {
+#ifndef NDEBUG
+ // ~raw_ostream asserts that the buffer is empty. This isn't necessary
+ // with raw_null_ostream, but it's better to have raw_null_ostream follow
+ // the rules than to change the rules just for raw_null_ostream.
+ flush();
+#endif
+}
+
void raw_null_ostream::write_impl(const char *Ptr, size_t Size) {
}