about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--include/klee/Expr.h8
-rw-r--r--lib/Expr/Expr.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h
index 41d980a6..5888d4d6 100644
--- a/include/klee/Expr.h
+++ b/include/klee/Expr.h
@@ -341,8 +341,12 @@ public:
     return value.getLimitedValue(Limit);
   }
 
-  /// toString - Return the constant value as a decimal string.
-  void toString(std::string &Res) const;
+  /// toString - Return the constant value as a string
+  /// \param Res specifies the string for the result to be placed in
+  /// \param radix specifies the base (e.g. 2,10,16). The default is base 10
+  void toString(std::string &Res, unsigned radix=10) const;
+
+
  
   int compareContents(const Expr &b) const { 
     const ConstantExpr &cb = static_cast<const ConstantExpr&>(b);
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index fa8525b6..630de164 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -347,8 +347,8 @@ void ConstantExpr::toMemory(void *address) {
   }
 }
 
-void ConstantExpr::toString(std::string &Res) const {
-  Res = value.toString(10, false);
+void ConstantExpr::toString(std::string &Res, unsigned radix) const {
+  Res = value.toString(radix, false);
 }
 
 ref<ConstantExpr> ConstantExpr::Concat(const ref<ConstantExpr> &RHS) {