This reverts commit r234460 and r234461.
[oota-llvm.git] / include / llvm / Support / circular_raw_ostream.h
index 2b3c329b5861763d1d2b707231b117c37a481e04..3d0f6e83cd35def4039a5dc1a425e9e5d71426d6 100644 (file)
@@ -71,7 +71,7 @@ namespace llvm
 
     /// flushBuffer - Dump the contents of the buffer to Stream.
     ///
-    void flushBuffer(void) {
+    void flushBuffer() {
       if (Filled)
         // Write the older portion of the buffer.
         TheStream->write(Cur, BufferArray + BufferSize - Cur);
@@ -81,12 +81,12 @@ namespace llvm
       Filled = false;
     }
 
-    virtual void write_impl(const char *Ptr, size_t Size);
+    void write_impl(const char *Ptr, size_t Size) override;
 
     /// current_pos - Return the current position within the stream,
     /// not counting the bytes currently in the buffer.
     ///
-    virtual uint64_t current_pos() const { 
+    uint64_t current_pos() const override {
       // This has the same effect as calling TheStream.current_pos(),
       // but that interface is private.
       return TheStream->tell() - TheStream->GetNumBytesInBuffer();
@@ -109,10 +109,10 @@ namespace llvm
     circular_raw_ostream(raw_ostream &Stream, const char *Header,
                          size_t BuffSize = 0, bool Owns = REFERENCE_ONLY) 
         : raw_ostream(/*unbuffered*/true),
-            TheStream(0),
+            TheStream(nullptr),
             OwnsStream(Owns),
             BufferSize(BuffSize),
-            BufferArray(0),
+            BufferArray(nullptr),
             Filled(false),
             Banner(Header) {
       if (BufferSize != 0)
@@ -120,15 +120,6 @@ namespace llvm
       Cur = BufferArray;
       setStream(Stream, Owns);
     }
-    explicit circular_raw_ostream()
-        : raw_ostream(/*unbuffered*/true),
-            TheStream(0),
-            OwnsStream(REFERENCE_ONLY),
-            BufferArray(0),
-            Filled(false),
-            Banner("") {
-      Cur = BufferArray;
-    }
 
     ~circular_raw_ostream() {
       flush();
@@ -151,7 +142,7 @@ namespace llvm
     /// flushBufferWithBanner - Force output of the buffer along with
     /// a small header.
     ///
-    void flushBufferWithBanner(void);
+    void flushBufferWithBanner();
 
   private:
     /// releaseStream - Delete the held stream if needed. Otherwise,