From 93a522bababab45d63f802f78fdcafec10311374 Mon Sep 17 00:00:00 2001 From: David Greene <greened@obbligato.org> Date: Tue, 5 Jan 2010 01:28:43 +0000 Subject: [PATCH] Change errs() to dbgs(). llvm-svn: 92641 --- llvm/lib/Support/FormattedStream.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/llvm/lib/Support/FormattedStream.cpp b/llvm/lib/Support/FormattedStream.cpp index 70f2cfa6ae88..9ab3666340e2 100644 --- a/llvm/lib/Support/FormattedStream.cpp +++ b/llvm/lib/Support/FormattedStream.cpp @@ -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; +}