about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-22 03:38:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-22 03:38:14 +0000
commit93109234b9e7c5ba50441bbfab3dad02a77f8787 (patch)
tree8fe55a83d5cbdffcf8e4b9a7c447141798a20c2b /lib
parenta99507bc04f2c16e6de118795a63a074899df66b (diff)
downloadklee-93109234b9e7c5ba50441bbfab3dad02a77f8787.tar.gz
Store ConstantExpr's value as an APInt.
 - In anticipation of supporting large constant values.


git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Expr/Expr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index a89163f2..2d41a579 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -164,7 +164,7 @@ unsigned Expr::computeHash() {
 }
 
 unsigned ConstantExpr::computeHash() {
-  hashValue = value ^ (width * MAGIC_HASH_CONSTANT);
+  hashValue = getConstantValue() ^ (width * MAGIC_HASH_CONSTANT);
   return hashValue;
 }
 
@@ -338,11 +338,11 @@ ref<Expr> ConstantExpr::fromMemory(void *address, Width width) {
 void ConstantExpr::toMemory(void *address) {
   switch (width) {
   default: assert(0 && "invalid type");
-  case  Expr::Bool: *(( uint8_t*) address) = value; break;
-  case  Expr::Int8: *(( uint8_t*) address) = value; break;
-  case Expr::Int16: *((uint16_t*) address) = value; break;
-  case Expr::Int32: *((uint32_t*) address) = value; break;
-  case Expr::Int64: *((uint64_t*) address) = value; break;
+  case  Expr::Bool: *(( uint8_t*) address) = getConstantValue(); break;
+  case  Expr::Int8: *(( uint8_t*) address) = getConstantValue(); break;
+  case Expr::Int16: *((uint16_t*) address) = getConstantValue(); break;
+  case Expr::Int32: *((uint32_t*) address) = getConstantValue(); break;
+  case Expr::Int64: *((uint64_t*) address) = getConstantValue(); break;
   }
 }