diff options
Diffstat (limited to 'lib/Support/Debug.cpp')
-rw-r--r-- | lib/Support/Debug.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp index a09cddf902..b6beddb369 100644 --- a/lib/Support/Debug.cpp +++ b/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. |