about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2014-09-13 11:29:19 -0700
committerDaniel Dunbar <daniel@zuster.org>2014-09-13 11:29:32 -0700
commit2ce22af434e383cf0c2c65e4da829de630b6cd9d (patch)
treec49e4a0461ffa7c95adfa0fefd15bbc10b654c1f /tools
parent91eab8b92526a8215ebc9ed50da5b1d405533ac7 (diff)
downloadklee-2ce22af434e383cf0c2c65e4da829de630b6cd9d.tar.gz
Add KLEE specific DEBUG macros.
 - This allows us to build in +Asserts mode even when LLVM isn't (by disabling
   the checks in that mode).

 - Eventually it would be nice to just move off of LLVM's DEBUG infrastructure
   entirely and just have our own copy, but this works for now.

 - Fixes #150.
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index f0f8cbe2..4411f73a 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -10,6 +10,7 @@
 #include "klee/Config/Version.h"
 #include "klee/Internal/ADT/KTest.h"
 #include "klee/Internal/ADT/TreeStream.h"
+#include "klee/Internal/Support/Debug.h"
 #include "klee/Internal/Support/ModuleUtil.h"
 #include "klee/Internal/System/Time.h"
 
@@ -41,7 +42,6 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Debug.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
@@ -584,21 +584,21 @@ std::string KleeHandler::getRunTimeLibraryPath(const char *argv0) {
 
   if ( strcmp(toolRoot.c_str(), KLEE_INSTALL_BIN_DIR ) == 0)
   {
-    DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() <<
-                    "Using installed KLEE library runtime: ");
+    KLEE_DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() <<
+                         "Using installed KLEE library runtime: ");
     libDir = KLEE_INSTALL_LIB_DIR ;
   }
   else
   {
-    DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() <<
-                    "Using build directory KLEE library runtime :");
+    KLEE_DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() <<
+                         "Using build directory KLEE library runtime :");
     libDir = KLEE_DIR;
     llvm::sys::path::append(libDir,RUNTIME_CONFIGURATION);
     llvm::sys::path::append(libDir,"lib");
   }
 
-  DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() <<
-                  libDir.c_str() << "\n");
+  KLEE_DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() <<
+                       libDir.c_str() << "\n");
   return libDir.str();
 }