Delete raw_stdout_ostream and raw_stderr_ostream, which are unused
authorDan Gohman <gohman@apple.com>
Fri, 20 Aug 2010 16:39:41 +0000 (16:39 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 20 Aug 2010 16:39:41 +0000 (16:39 +0000)
outside of outs() and errs() themselves, and they don't really
need custom classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111642 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/raw_ostream.h
lib/Support/raw_ostream.cpp

index 72e38e611ba31151f4b70466f81a8ccc783e1922..1fea44f96e0831f8e99c3b6d65c58d1920222466 100644 (file)
@@ -392,24 +392,6 @@ public:
   }
 };
 
-/// raw_stdout_ostream - This is a stream that always prints to stdout.
-///
-class raw_stdout_ostream : public raw_fd_ostream {
-  // An out of line virtual method to provide a home for the class vtable.
-  virtual void handle();
-public:
-  raw_stdout_ostream();
-};
-
-/// raw_stderr_ostream - This is a stream that always prints to stderr.
-///
-class raw_stderr_ostream : public raw_fd_ostream {
-  // An out of line virtual method to provide a home for the class vtable.
-  virtual void handle();
-public:
-  raw_stderr_ostream();
-};
-
 /// outs() - This returns a reference to a raw_ostream for standard output.
 /// Use it like: outs() << "foo" << "bar";
 raw_ostream &outs();
index a0614bf33ed276250fd65d11943869363cea075b..9915b0c8fd2dbca1c300dca09d2150726ac25e41 100644 (file)
@@ -543,27 +543,19 @@ bool raw_fd_ostream::is_displayed() const {
 //  raw_stdout/err_ostream
 //===----------------------------------------------------------------------===//
 
-// Set buffer settings to model stdout and stderr behavior.
-// Set standard error to be unbuffered by default.
-raw_stdout_ostream::raw_stdout_ostream():raw_fd_ostream(STDOUT_FILENO, false) {}
-raw_stderr_ostream::raw_stderr_ostream():raw_fd_ostream(STDERR_FILENO, false,
-                                                        true) {}
-
-// An out of line virtual method to provide a home for the class vtable.
-void raw_stdout_ostream::handle() {}
-void raw_stderr_ostream::handle() {}
-
 /// outs() - This returns a reference to a raw_ostream for standard output.
 /// Use it like: outs() << "foo" << "bar";
 raw_ostream &llvm::outs() {
-  static raw_stdout_ostream S;
+  // Set buffer settings to model stdout behavior.
+  static raw_fd_ostream S(STDOUT_FILENO, false);
   return S;
 }
 
 /// errs() - This returns a reference to a raw_ostream for standard error.
 /// Use it like: errs() << "foo" << "bar";
 raw_ostream &llvm::errs() {
-  static raw_stderr_ostream S;
+  // Set standard error to be unbuffered by default.
+  static raw_fd_ostream S(STDERR_FILENO, false, true);
   return S;
 }