Index: llvm/lib/Support/StringMap.cpp =================================================================== --- llvm/lib/Support/StringMap.cpp +++ llvm/lib/Support/StringMap.cpp @@ -13,7 +13,6 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Compiler.h" -#include "llvm/Support/DJB.h" #include "llvm/Support/MathExtras.h" #include @@ -80,7 +79,7 @@ init(16); HTSize = NumBuckets; } - unsigned FullHashValue = djbHash(Name, 0); + unsigned FullHashValue = hash_value(Name); unsigned BucketNo = FullHashValue & (HTSize-1); unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); @@ -134,7 +133,7 @@ int StringMapImpl::FindKey(StringRef Key) const { unsigned HTSize = NumBuckets; if (HTSize == 0) return -1; // Really empty table? - unsigned FullHashValue = djbHash(Key, 0); + unsigned FullHashValue = hash_value(Key); unsigned BucketNo = FullHashValue & (HTSize-1); unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1); Index: llvm/lib/Support/StringRef.cpp =================================================================== --- llvm/lib/Support/StringRef.cpp +++ llvm/lib/Support/StringRef.cpp @@ -12,6 +12,7 @@ #include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/edit_distance.h" +#include "llvm/Support/DJB.h" #include using namespace llvm; @@ -595,5 +596,5 @@ // Implementation of StringRef hashing. hash_code llvm::hash_value(StringRef S) { - return hash_combine_range(S.begin(), S.end()); + return djbHash(S, 0); }