diff options
Diffstat (limited to 'llvm/lib/Support')
| -rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 3cec18b442e..7e34e06c8dc 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -45,6 +45,11 @@  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  | 

