diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-03 03:04:21 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-03 03:04:21 +0000 |
commit | 9fbd39da947d7664d9905677c03dd12f548ebf05 (patch) | |
tree | d5df69c71e52322f9ee6251cf438d12ef4b87a8d /include | |
parent | bcfc431c7133fb93f93c1768fd900f049e365323 (diff) | |
download | klee-9fbd39da947d7664d9905677c03dd12f548ebf05.tar.gz |
Inline Expr::hashConstant into callers.
(Extraneous uses are going away shortly) git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72749 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/klee/Expr.h | 4 | ||||
-rw-r--r-- | include/klee/util/Ref.h | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h index cb5423e0..f0adc42d 100644 --- a/include/klee/Expr.h +++ b/include/klee/Expr.h @@ -178,10 +178,6 @@ public: /// Returns the hash value. virtual unsigned computeHash(); - static unsigned hashConstant(uint64_t val, Width w) { - return val ^ (w * MAGIC_HASH_CONSTANT); - } - /// Returns 0 iff b is structuraly equivalent to *this int compare(const Expr &b) const; virtual int compareContents(const Expr &b) const { return 0; } diff --git a/include/klee/util/Ref.h b/include/klee/util/Ref.h index f900f137..a552df39 100644 --- a/include/klee/util/Ref.h +++ b/include/klee/util/Ref.h @@ -129,7 +129,7 @@ public: unsigned hash() const { if (constantWidth) { - return Expr::hashConstant(contents.val, constantWidth); + return contents.val ^ (constantWidth * Expr::MAGIC_HASH_CONSTANT); } else { return contents.ptr->hash(); } @@ -137,7 +137,7 @@ public: unsigned computeHash() const { if (isConstant()) { - return Expr::hashConstant(contents.val, constantWidth); + return contents.val ^ (constantWidth * Expr::MAGIC_HASH_CONSTANT); } else { return contents.ptr->computeHash(); } |