summaryrefslogtreecommitdiff
path: root/lib/Support/FormattedStream.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-15 15:37:28 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-15 15:37:28 +0000
commit829000e035f46f2a227a5466e4e427a2f3cc00a9 (patch)
treebe5a687969f682edded4aa6f13594ffd9aa9030e /lib/Support/FormattedStream.cpp
parent1e7804dbd25b8dbf534c850355d70ad215206f4b (diff)
Notes
Diffstat (limited to 'lib/Support/FormattedStream.cpp')
-rw-r--r--lib/Support/FormattedStream.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/FormattedStream.cpp b/lib/Support/FormattedStream.cpp
index 70f2cfa6ae88..9ab3666340e2 100644
--- a/lib/Support/FormattedStream.cpp
+++ b/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;
+}