diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-12-18 13:24:18 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-12-18 13:24:18 +0000 |
commit | 0dbb147725e61ccb491039100d170357567c2b46 (patch) | |
tree | 902faade063168054f2a6e5ff5ef998455946ec9 | |
parent | b8a74d8593e063ac9168ce273cbf1691aaa360cd (diff) | |
download | klee-0dbb147725e61ccb491039100d170357567c2b46.tar.gz |
Fix duplication of ``klee::ArrayHashFn`` in
``include/klee/util/ArrayCache.h``.
-rw-r--r-- | include/klee/util/ArrayCache.h | 12 |
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; |