about summary refs log tree commit diff homepage
path: root/lib/Core/AddressSpace.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-14 06:16:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-14 06:16:49 +0000
commit171810d97c206c090ff588729f1ee16f9d47cbfb (patch)
treec3d9bafcd329cfca3293bc71cb4d5ead2512f043 /lib/Core/AddressSpace.cpp
parent7c27c8a6a7c233c3c6162d9b86942351fe5f42b3 (diff)
downloadklee-171810d97c206c090ff588729f1ee16f9d47cbfb.tar.gz
Change AddressSpace::resolveOne to take a ConstantExpr directly (and to allow
64-bit addresses).


git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Core/AddressSpace.cpp')
-rw-r--r--lib/Core/AddressSpace.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Core/AddressSpace.cpp b/lib/Core/AddressSpace.cpp
index 5b73a6f6..1e683e34 100644
--- a/lib/Core/AddressSpace.cpp
+++ b/lib/Core/AddressSpace.cpp
@@ -51,8 +51,9 @@ ObjectState *AddressSpace::getWriteable(const MemoryObject *mo,
 
 /// 
 
-bool AddressSpace::resolveOne(uint64_t addr64, ObjectPair &result) {
-  unsigned address = (unsigned) addr64;
+bool AddressSpace::resolveOne(const ref<ConstantExpr> &addr, 
+                              ObjectPair &result) {
+  uint64_t address = addr->getZExtValue();
   MemoryObject hack(address);
 
   if (const MemoryMap::value_type *res = objects.lookup_previous(&hack)) {
@@ -73,7 +74,7 @@ bool AddressSpace::resolveOne(ExecutionState &state,
                               ObjectPair &result,
                               bool &success) {
   if (ConstantExpr *CE = dyn_cast<ConstantExpr>(address)) {
-    success = resolveOne(CE->getConstantValue(), result);
+    success = resolveOne(CE, result);
     return true;
   } else {
     TimerStatIncrementer timer(stats::resolveTime);
@@ -165,7 +166,7 @@ bool AddressSpace::resolve(ExecutionState &state,
                            double timeout) {
   if (ConstantExpr *CE = dyn_cast<ConstantExpr>(p)) {
     ObjectPair res;
-    if (resolveOne(CE->getConstantValue(), res))
+    if (resolveOne(CE, res))
       rl.push_back(res);
     return false;
   } else {