#include "llvm/Support/raw_ostream.h"
-namespace llvm
-{
+namespace llvm {
/// circular_raw_ostream - A raw_ostream which *can* save its data
/// to a circular buffer, or can pass it through directly to an
/// underlying stream if specified with a buffer of zero.
///
circular_raw_ostream(raw_ostream &Stream, const char *Header,
size_t BuffSize = 0, bool Owns = REFERENCE_ONLY)
- : raw_ostream(SK_CIRCULAR, /*unbuffered*/ true), TheStream(nullptr),
+ : raw_ostream(/*unbuffered*/ true), TheStream(nullptr),
OwnsStream(Owns), BufferSize(BuffSize), BufferArray(nullptr),
Filled(false), Banner(Header) {
if (BufferSize != 0)
setStream(Stream, Owns);
}
- ~circular_raw_ostream() {
+ ~circular_raw_ostream() override {
flush();
flushBufferWithBanner();
releaseStream();
///
void flushBufferWithBanner();
- static bool classof(const raw_ostream *OS) {
- return OS->getKind() == SK_CIRCULAR;
- }
-
private:
/// releaseStream - Delete the held stream if needed. Otherwise,
/// transfer the buffer settings from this circular_raw_ostream
};
} // end llvm namespace
-
#endif