diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-17 23:52:28 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-17 23:52:28 +0000 |
commit | 2596e429a61602312bdd149786045b8a90cd2d10 (patch) | |
tree | 3a2a73e85d93fdefd4ad808bf01ece15f908460e /lib/Lex/PTHLexer.cpp | |
parent | aa546e2d1111cf3ff2cf4db721f587f3a9d3f5e1 (diff) |
Switch to llvm::HashString.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index f804f82c48..8ca1ec016f 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -20,8 +20,9 @@ #include "clang/Lex/PTHManager.h" #include "clang/Lex/Token.h" #include "clang/Lex/Preprocessor.h" -#include "llvm/ADT/StringMap.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/StringMap.h" #include "llvm/Support/MemoryBuffer.h" #include <sys/stat.h> using namespace clang; @@ -308,7 +309,7 @@ public: typedef std::pair<unsigned char, const char*> internal_key_type; static unsigned ComputeHash(internal_key_type x) { - return BernsteinHash(x.second); + return llvm::HashString(x.second); } static std::pair<unsigned, unsigned> @@ -363,7 +364,7 @@ public: } static unsigned ComputeHash(const internal_key_type& a) { - return BernsteinHash(a.first, a.second); + return llvm::HashString(llvm::StringRef(a.first, a.second)); } // This hopefully will just get inlined and removed by the optimizer. |