summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Debug.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-07-20 16:16:06 +0000
committerDavid Greene <greened@obbligato.org>2009-07-20 16:16:06 +0000
commit7ea9d0b6e294960b9a9c750e0c5ad75efd3133ad (patch)
treea67751b537599362173d5fba70f438595ffd26f4 /llvm/lib/Support/Debug.cpp
parent802a0b576f9dc217d6be4acb354a12f181ccb6dc (diff)
downloadbcm5719-llvm-7ea9d0b6e294960b9a9c750e0c5ad75efd3133ad.tar.gz
bcm5719-llvm-7ea9d0b6e294960b9a9c750e0c5ad75efd3133ad.zip
Hide the DOUT static variable behind a function interface.
llvm-svn: 76425
Diffstat (limited to 'llvm/lib/Support/Debug.cpp')
-rw-r--r--llvm/lib/Support/Debug.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/Debug.cpp b/llvm/lib/Support/Debug.cpp
index a09cddf9022..b6beddb369d 100644
--- a/llvm/lib/Support/Debug.cpp
+++ b/llvm/lib/Support/Debug.cpp
@@ -64,6 +64,14 @@ bool llvm::isCurrentDebugType(const char *DebugType) {
#endif
}
+/// getNullOutputStream - Return a null string that does not output
+/// anything. This hides the static variable from other modules.
+///
+OStream &llvm::getNullOutputStream() {
+ static llvm::OStream NullStream(0);
+ return NullStream;
+}
+
// getErrorOutputStream - Returns the error output stream (std::cerr). This
// 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.
OpenPOWER on IntegriCloud