//
//===----------------------------------------------------------------------===//
-#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
// 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;
}