Make the assignment operator for SmallPtrSet return a reference, and fix a long-stand...
[oota-llvm.git] / lib / Support / Debug.cpp
index 6e67ed8f6733c175442e4766921b100ef6fc9dd0..c5b6fa2bf443b0d79f0b637fe6ef8f9affc52771 100644 (file)
@@ -69,8 +69,9 @@ bool llvm::isCurrentDebugType(const char *DebugType) {
 // program from having to have hundreds of static c'tor/d'tors for them.
 // 
 OStream &llvm::getErrorOutputStream(const char *DebugType) {
+  static OStream cnoout(0);
   if (DebugFlag && isCurrentDebugType(DebugType))
     return cerr;
   else
-    return cnull;
+    return cnoout;
 }