aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/Debug.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2006-11-17 09:52:49 +0000
committerBill Wendling <isanbard@gmail.com>2006-11-17 09:52:49 +0000
commit52883e7a9a637c0d6dea091917090a8ac63e7736 (patch)
treed013a0dd10422e717047ce4fbd7b20e00c890569 /include/llvm/Support/Debug.h
parente562ed1c92d2d0845632c0f7d9f294fa7c4103ba (diff)
Used llvm_ostream instead of std::ostream objects. This will reduce use
of the icky <iostream> class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Debug.h')
-rw-r--r--include/llvm/Support/Debug.h20
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.