[Support] Replace HashString with djbHash.
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 26 Feb 2018 11:30:13 +0000 (11:30 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 26 Feb 2018 11:30:13 +0000 (11:30 +0000)
commitb9ad17593511a6ea513c237bd4efd760c9fb762b
tree7ad47c3bc9e83216580843c7e5f0552187f482e8
parentb84e158df7ff87d16141d798a47de3dc430036df
[Support] Replace HashString with djbHash.

This removes the HashString function from StringExtraces and replaces
its uses with calls to djbHash from DJB.h

This is *almost* NFC. While the algorithm is identical, the djbHash
implementation in StringExtras used 0 as its seed while the
implementation in DJB uses 5381. The latter has been shown to result in
less collisions and improved avalanching.

https://reviews.llvm.org/D43615
(cherry picked from commit 77f7f965bc9499a9ae768a296ca5a1f7347d1d2c)

llvm-svn: 326081
clang/lib/Frontend/ASTUnit.cpp
clang/lib/Frontend/CacheTokens.cpp
clang/lib/Lex/PTHLexer.cpp
clang/lib/Serialization/ASTCommon.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/lib/Serialization/GlobalModuleIndex.cpp
lld/include/lld/Core/SymbolTable.h
lldb/source/Utility/ConstString.cpp
llvm/include/llvm/ADT/StringExtras.h
llvm/lib/Support/StringMap.cpp