[llvm-commits] [llvm] r151839 - /llvm/trunk/include/llvm/ADT/Hashing.h
Chandler Carruth
chandlerc at gmail.com
Thu Mar 1 13:45:52 PST 2012
Author: chandlerc
Date: Thu Mar 1 15:45:51 2012
New Revision: 151839
URL: http://llvm.org/viewvc/llvm-project?rev=151839&view=rev
Log:
Fix two warnings in this code that I missed.
Modified:
llvm/trunk/include/llvm/ADT/Hashing.h
Modified: llvm/trunk/include/llvm/ADT/Hashing.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Hashing.h?rev=151839&r1=151838&r2=151839&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Hashing.h (original)
+++ llvm/trunk/include/llvm/ADT/Hashing.h Thu Mar 1 15:45:51 2012
@@ -219,7 +219,7 @@
uint64_t wf = a + z;
uint64_t ws = b + rotate(a, 31) + c;
uint64_t r = shift_mix((vf + ws) * k2 + (wf + vs) * k0);
- return shift_mix(seed ^ (r * k0) + vs) * k2;
+ return shift_mix((seed ^ (r * k0)) + vs) * k2;
}
inline uint64_t hash_short(const char *s, size_t length, uint64_t seed) {
@@ -325,8 +325,9 @@
//
// However, if there is a fixed seed override set the first time this is
// called, return that instead of the per-execution seed.
+ const uint64_t seed_prime = 0xff51afd7ed558ccdULL;
static size_t seed = fixed_seed_override ? fixed_seed_override
- : 0xff51afd7ed558ccdULL;
+ : static_cast<size_t>(seed_prime);
return seed;
}
More information about the llvm-commits
mailing list