about summary refs log tree commit diff homepage
path: root/include
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2015-12-18 13:24:18 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2015-12-18 13:24:18 +0000
commit0dbb147725e61ccb491039100d170357567c2b46 (patch)
tree902faade063168054f2a6e5ff5ef998455946ec9 /include
parentb8a74d8593e063ac9168ce273cbf1691aaa360cd (diff)
downloadklee-0dbb147725e61ccb491039100d170357567c2b46.tar.gz
Fix duplication of ``klee::ArrayHashFn`` in
``include/klee/util/ArrayCache.h``.
Diffstat (limited to 'include')
-rw-r--r--include/klee/util/ArrayCache.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/klee/util/ArrayCache.h b/include/klee/util/ArrayCache.h
index 3dd88a11..56d69df6 100644
--- a/include/klee/util/ArrayCache.h
+++ b/include/klee/util/ArrayCache.h
@@ -11,6 +11,7 @@
 #define KLEE_ARRAY_CACHE_H
 
 #include "klee/Expr.h"
+#include "klee/util/ArrayExprHash.h" // For klee::ArrayHashFn
 
 // FIXME: Remove this hack when we switch to C++11
 #ifdef _LIBCPP_VERSION
@@ -26,15 +27,6 @@
 
 namespace klee {
 
-// FIXME: This is copied from ``klee/util/ArrayExprHash.h``.
-// We can't include it here becaues the includes are messed up
-// in that file.
-struct EquivArrayHashFn {
-  unsigned operator()(const Array *array) const {
-    return (array ? array->hash() : 0);
-  }
-};
-
 struct EquivArrayCmpFn {
   bool operator()(const Array *array1, const Array *array2) const {
     if (array1 == NULL || array2 == NULL)
@@ -76,7 +68,7 @@ public:
                            Expr::Width _range = Expr::Int8);
 
 private:
-  typedef unordered_set<const Array *, klee::EquivArrayHashFn,
+  typedef unordered_set<const Array *, klee::ArrayHashFn,
                         klee::EquivArrayCmpFn> ArrayHashMap;
   ArrayHashMap cachedSymbolicArrays;
   typedef std::vector<const Array *> ArrayPtrVec;