aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/Debug.h
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-07-17 15:55:53 +0000
committerDavid Greene <greened@obbligato.org>2009-07-17 15:55:53 +0000
commitfd377bda1d9295c4b54cae8fe38446ba7542c6f7 (patch)
treeb6c656dd8ed77358c1af84007712f439b3a47410 /include/llvm/Support/Debug.h
parent766e20fb6bdd526b07dd2b3d391b74707b0a809b (diff)
downloadexternal_llvm-fd377bda1d9295c4b54cae8fe38446ba7542c6f7.zip
external_llvm-fd377bda1d9295c4b54cae8fe38446ba7542c6f7.tar.gz
external_llvm-fd377bda1d9295c4b54cae8fe38446ba7542c6f7.tar.bz2
Make DOUT an lvalue in release mode so that developers may use DOUT in
their code in release mode. This helps to debug release-mode problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Debug.h')
-rw-r--r--include/llvm/Support/Debug.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/Debug.h b/include/llvm/Support/Debug.h
index 52d0d3f..0ebed20 100644
--- a/include/llvm/Support/Debug.h
+++ b/include/llvm/Support/Debug.h
@@ -68,7 +68,8 @@ bool isCurrentDebugType(const char *Type);
OStream &getErrorOutputStream(const char *DebugType);
#ifdef NDEBUG
-#define DOUT llvm::OStream(0)
+static llvm::OStream NullStream(0);
+#define DOUT llvm::NullStream
#else
#define DOUT llvm::getErrorOutputStream(DEBUG_TYPE)
#endif