[TrailingObjects] Dynamically realign under-aligned trailing objects.
[oota-llvm.git] / include / llvm / Support / circular_raw_ostream.h
index 0d1f378846f9bc783218263c8b75e3ac2a7f36ed..b46fd7f730c914b72c5c83d0817cfbab3fbd7b96 100644 (file)
@@ -17,8 +17,7 @@
 
 #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.
@@ -108,7 +107,7 @@ namespace llvm
     ///
     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)
@@ -117,7 +116,7 @@ namespace llvm
       setStream(Stream, Owns);
     }
 
-    ~circular_raw_ostream() {
+    ~circular_raw_ostream() override {
       flush();
       flushBufferWithBanner();
       releaseStream();
@@ -140,10 +139,6 @@ namespace llvm
     ///
     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
@@ -158,5 +153,4 @@ namespace llvm
   };
 } // end llvm namespace
 
-
 #endif