llvm.org GIT mirror llvm / f78c835
Make raw_null_ostream flush its buffer in its destructor, so that 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 Dan Gohman 10 years ago
2 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
419419
420420 public:
421421 explicit raw_null_ostream() {}
422 ~raw_null_ostream();
422423 };
423424
424425 } // end llvm namespace
437437 // raw_null_ostream
438438 //===----------------------------------------------------------------------===//
439439
440 raw_null_ostream::~raw_null_ostream() {
441 #ifndef NDEBUG
442 // ~raw_ostream asserts that the buffer is empty. This isn't necessary
443 // with raw_null_ostream, but it's better to have raw_null_ostream follow
444 // the rules than to change the rules just for raw_null_ostream.
445 flush();
446 #endif
447 }
448
440449 void raw_null_ostream::write_impl(const char *Ptr, size_t Size) {
441450 }
442451