about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--include/klee/Expr.h3
-rw-r--r--lib/Expr/Expr.cpp5
2 files changed, 8 insertions, 0 deletions
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<Expr> ConstantExpr::fromMemory(void *address, Width width) {