diff options
Diffstat (limited to 'include/llvm/Support/Debug.h')
-rw-r--r-- | include/llvm/Support/Debug.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/include/llvm/Support/Debug.h b/include/llvm/Support/Debug.h index cedb50dcd2..9f0f1611d7 100644 --- a/include/llvm/Support/Debug.h +++ b/include/llvm/Support/Debug.h @@ -26,7 +26,7 @@ #ifndef LLVM_SUPPORT_DEBUG_H #define LLVM_SUPPORT_DEBUG_H -#include <ostream> // Doesn't have static d'tors!! +#include "llvm/Support/Streams.h" namespace llvm { @@ -61,24 +61,6 @@ bool isCurrentDebugType(const char *Type); do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0) #endif -/// llvm_ostream - Acts like an ostream. However, it doesn't print things out if -/// an ostream isn't specified. -/// -class llvm_ostream { - std::ostream* Stream; -public: - llvm_ostream() : Stream(0) {} - llvm_ostream(std::ostream& OStream) : Stream(&OStream) {} - - template <typename Ty> - llvm_ostream& operator << (const Ty& Thing) { -#ifndef NDEBUG - if (Stream) *Stream << Thing; -#endif - return *this; - } -}; - /// 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. |