about summary refs log tree commit diff homepage
path: root/lib/Expr/Expr.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-22 03:21:02 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-22 03:21:02 +0000
commita99507bc04f2c16e6de118795a63a074899df66b (patch)
tree34e4b92522d482155a98619b5918a19dabb3de77 /lib/Expr/Expr.cpp
parent2ec4358c44e21fd43fa78d933dca7fbc55f0a908 (diff)
downloadklee-a99507bc04f2c16e6de118795a63a074899df66b.tar.gz
Add ConstantExpr::toString (instead of using getConstantValue()).
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/Expr.cpp')
-rw-r--r--lib/Expr/Expr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index b6833f24..a89163f2 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -9,7 +9,6 @@
 
 #include "klee/Expr.h"
 
-
 #include "klee/Machine.h"
 #include "llvm/Type.h"
 #include "llvm/DerivedTypes.h"
@@ -21,6 +20,8 @@
 
 #include "klee/util/ExprPPrinter.h"
 
+#include <sstream>
+
 using namespace klee;
 using namespace llvm;
 
@@ -345,6 +346,12 @@ void ConstantExpr::toMemory(void *address) {
   }
 }
 
+void ConstantExpr::toString(std::string &Res) const {
+  std::stringstream os;
+  os << *this;
+  Res = os.str();
+}
+
 ref<ConstantExpr> ConstantExpr::Concat(const ref<ConstantExpr> &RHS) {
   Expr::Width W = getWidth() + RHS->getWidth();
   assert(W <= 64 && "FIXME: Support arbitrary bit-widths!");