Change errs() to dbgs().
authorDavid Greene <greened@obbligato.org>
Tue, 5 Jan 2010 01:28:43 +0000 (01:28 +0000)
committerDavid Greene <greened@obbligato.org>
Tue, 5 Jan 2010 01:28:43 +0000 (01:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92641 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/FormattedStream.cpp

index 70f2cfa6ae882cf0ca772679eaa49b73df9ebc32..9ab3666340e2879eec1653ec7dd7a49083443b5b 100644 (file)
@@ -11,6 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/FormattedStream.h"
 
 using namespace llvm;
@@ -91,3 +92,10 @@ formatted_raw_ostream &llvm::ferrs() {
   static formatted_raw_ostream S(errs());
   return S;
 }
+
+/// fdbgs() - This returns a reference to a formatted_raw_ostream for
+/// the debug stream.  Use it like: fdbgs() << "foo" << "bar";
+formatted_raw_ostream &llvm::fdbgs() {
+  static formatted_raw_ostream S(dbgs());
+  return S;
+}