don't build bzip2 for now
[oota-llvm.git] / lib / Support / Debug.cpp
index cbf12c7c0d72da10fae40a812cf366c847d199c2..c5b6fa2bf443b0d79f0b637fe6ef8f9affc52771 100644 (file)
@@ -23,9 +23,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Support/Debug.h"
 #include "llvm/Support/CommandLine.h"
-#include <iostream>
+#include "llvm/Support/Debug.h"
 using namespace llvm;
 
 bool llvm::DebugFlag;  // DebugFlag - Exported boolean set by the -debug option
@@ -69,9 +68,10 @@ bool llvm::isCurrentDebugType(const char *DebugType) {
 // places the std::c* I/O streams into one .cpp file and relieves the whole
 // program from having to have hundreds of static c'tor/d'tors for them.
 // 
-llvm_ostream llvm::getErrorOutputStream(const char *DebugType) {
+OStream &llvm::getErrorOutputStream(const char *DebugType) {
+  static OStream cnoout(0);
   if (DebugFlag && isCurrentDebugType(DebugType))
-    return llvm_ostream(std::cerr);
+    return cerr;
   else
-    return llvm_ostream();
+    return cnoout;
 }