From be3fdc136766cb4f2c1fa5b785f3ce74e52f5565 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 1 Aug 2009 21:02:43 +0000 Subject: Add Expr::dump git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@77802 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/klee/Expr.h | 3 +++ lib/Expr/Expr.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/include/klee/Expr.h b/include/klee/Expr.h index 143ce4cd..9edcd8d0 100644 --- a/include/klee/Expr.h +++ b/include/klee/Expr.h @@ -180,6 +180,9 @@ public: virtual void print(std::ostream &os) const; + /// dump - Print the expression to stderr. + void dump() const; + /// Returns the pre-computed hash of the current expression virtual unsigned hash() const { return hashValue; } diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index 3820fd32..b1bf9824 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -290,6 +290,11 @@ void Expr::print(std::ostream &os) const { ExprPPrinter::printSingleExpr(os, (Expr*)this); } +void Expr::dump() const { + this->print(*llvm::cerr.stream()); + llvm::cerr << std::endl; +} + /***/ ref ConstantExpr::fromMemory(void *address, Width width) { -- cgit 1.4.1