diff options
author | Daniel Dunbar <daniel@zuster.org> | 2014-09-13 11:29:19 -0700 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2014-09-13 11:29:32 -0700 |
commit | 2ce22af434e383cf0c2c65e4da829de630b6cd9d (patch) | |
tree | c49e4a0461ffa7c95adfa0fefd15bbc10b654c1f /lib/Support | |
parent | 91eab8b92526a8215ebc9ed50da5b1d405533ac7 (diff) | |
download | klee-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 'lib/Support')
-rw-r--r-- | lib/Support/TreeStream.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Support/TreeStream.cpp b/lib/Support/TreeStream.cpp index 0d5e4568..74ffe3ba 100644 --- a/lib/Support/TreeStream.cpp +++ b/lib/Support/TreeStream.cpp @@ -9,13 +9,14 @@ #include "klee/Internal/ADT/TreeStream.h" +#include "klee/Internal/Support/Debug.h" + #include <cassert> #include <iomanip> #include <fstream> #include <iterator> #include <map> -#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include <string.h> @@ -106,7 +107,7 @@ void TreeStreamWriter::readStream(TreeStreamID streamID, std::ifstream is(path.c_str(), std::ios::in | std::ios::binary); assert(is.good()); - DEBUG_WITH_TYPE("TreeStreamWriter", + KLEE_DEBUG_WITH_TYPE("TreeStreamWriter", llvm::errs() << "finding chain for: " << streamID << "\n"); std::map<unsigned,unsigned> parents; @@ -137,11 +138,13 @@ void TreeStreamWriter::readStream(TreeStreamID streamID, while (size--) is.get(); } } - DEBUG(llvm::errs() << "roots: "; - for (size_t i = 0, e = roots.size(); i < e; ++i) { - llvm::errs() << roots[i] << " "; - } - llvm::errs() << "\n";); + KLEE_DEBUG({ + llvm::errs() << "roots: "; + for (size_t i = 0, e = roots.size(); i < e; ++i) { + llvm::errs() << roots[i] << " "; + } + llvm::errs() << "\n"; + }); is.seekg(0, std::ios::beg); for (;;) { unsigned id; |