about summary refs log tree commit diff homepage
path: root/lib/Expr/Expr.cpp
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-10-18 19:45:55 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-10-18 19:45:55 +0000
commite2a2fceee17dbf7323b2dac00feb2293365fcc34 (patch)
treefe7b22c2315f5b088ec5fb7463de5542dee65918 /lib/Expr/Expr.cpp
parenta1d4a739609e2a491e846c765c05ddd0b9c79935 (diff)
downloadklee-e2a2fceee17dbf7323b2dac00feb2293365fcc34.tar.gz
Nice patch by Hristina Palikareva that removes the dependency on STP
arrays from the Array and UpdateNode classes.



git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@166214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/Expr.cpp')
-rw-r--r--lib/Expr/Expr.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index 089e78b3..fa8525b6 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -488,11 +488,13 @@ ref<Expr>  NotOptimizedExpr::create(ref<Expr> src) {
 extern "C" void vc_DeleteExpr(void*);
 
 Array::~Array() {
-  // FIXME: This shouldn't be necessary.
-  if (stpInitialArray) {
-    ::vc_DeleteExpr(stpInitialArray);
-    stpInitialArray = 0;
-  }
+}
+
+unsigned Array::computeHash() {
+  unsigned res = 0;
+  for (unsigned i = 0, e = name.size(); i != e; ++i)
+    res = (res * Expr::MAGIC_HASH_CONSTANT) + name[i];
+  return res; 
 }
 
 /***/