that the subclass hasn't left any pending data in the buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77245
91177308-0d34-0410-b5e6-
96231b3b80d8
using namespace llvm;
raw_ostream::~raw_ostream() {
+ // raw_ostream's subclasses should take care to flush the buffer
+ // in their destructors.
+ assert(OutBufCur == OutBufStart &&
+ "raw_ostream destructor called with non-empty buffer!");
+
delete [] OutBufStart;
// If there are any pending errors, report them now. Clients wishing