summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Debug.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-23 08:50:52 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-23 08:50:52 +0000
commit34ee2033370b7ca9cef4cc89eeae99c2d9638197 (patch)
tree7c4381eaf6946e12f97c2c4e8252bc8059cd44cf /llvm/lib/Support/Debug.cpp
parent471ba48cb99a9d9bb8964f63363a3470369c2ecc (diff)
downloadbcm5719-llvm-34ee2033370b7ca9cef4cc89eeae99c2d9638197.tar.gz
bcm5719-llvm-34ee2033370b7ca9cef4cc89eeae99c2d9638197.zip
Fix some refactos for iostream changes (in -Asserts mode).
- The world needs better C++ refactoring tools, can I get an Amen!? llvm-svn: 79843
Diffstat (limited to 'llvm/lib/Support/Debug.cpp')
-rw-r--r--llvm/lib/Support/Debug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/Debug.cpp b/llvm/lib/Support/Debug.cpp
index 806a6559df9..71ff411def2 100644
--- a/llvm/lib/Support/Debug.cpp
+++ b/llvm/lib/Support/Debug.cpp
@@ -27,9 +27,10 @@
#include "llvm/Support/Debug.h"
using namespace llvm;
+// All Debug.h functionality is a no-op in NDEBUG mode.
+#ifndef NDEBUG
bool llvm::DebugFlag; // DebugFlag - Exported boolean set by the -debug option
-#ifndef NDEBUG
// -debug - Command line option to enable the DEBUG statements in the passes.
// This flag may only be enabled in debug builds.
static cl::opt<bool, true>
@@ -48,16 +49,15 @@ static cl::opt<DebugOnlyOpt, true, cl::parser<std::string> >
DebugOnly("debug-only", cl::desc("Enable a specific type of debug output"),
cl::Hidden, cl::value_desc("debug string"),
cl::location(DebugOnlyOptLoc), cl::ValueRequired);
-#endif
// isCurrentDebugType - Return true if the specified string is the debug type
// specified on the command line, or if none was specified on the command line
// with the -debug-only=X option.
//
bool llvm::isCurrentDebugType(const char *DebugType) {
-#ifndef NDEBUG
return CurrentDebugType.empty() || DebugType == CurrentDebugType;
+}
#else
- return false;
+// Avoid "has no symbols" warning.
+int Debug_dummy = 0;
#endif
-}
OpenPOWER on IntegriCloud