[cfe-commits] r84376 - /cfe/trunk/include/clang/Basic/OnDiskHashTable.h
Daniel Dunbar
daniel at zuster.org
Sat Oct 17 16:52:36 PDT 2009
Author: ddunbar
Date: Sat Oct 17 18:52:36 2009
New Revision: 84376
URL: http://llvm.org/viewvc/llvm-project?rev=84376&view=rev
Log:
Remove unused BernsteinHash functions.
Modified:
cfe/trunk/include/clang/Basic/OnDiskHashTable.h
Modified: cfe/trunk/include/clang/Basic/OnDiskHashTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/OnDiskHashTable.h?rev=84376&r1=84375&r2=84376&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/OnDiskHashTable.h (original)
+++ cfe/trunk/include/clang/Basic/OnDiskHashTable.h Sat Oct 17 18:52:36 2009
@@ -25,27 +25,6 @@
namespace clang {
-// Bernstein hash function:
-// This is basically copy-and-paste from StringMap. This likely won't
-// stay here, which is why I didn't both to expose this function from
-// String Map.
-inline unsigned BernsteinHash(const char* x) {
- unsigned int R = 0;
- for ( ; *x != '\0' ; ++x) R = R * 33 + *x;
- return R + (R >> 5);
-}
-
-inline unsigned BernsteinHash(const char* x, unsigned n) {
- unsigned int R = 0;
- for (unsigned i = 0 ; i < n ; ++i, ++x) R = R * 33 + *x;
- return R + (R >> 5);
-}
-
-inline unsigned BernsteinHashPartial(const char* x, unsigned n, unsigned R) {
- for (unsigned i = 0 ; i < n ; ++i, ++x) R = R * 33 + *x;
- return R + (R >> 5);
-}
-
namespace io {
typedef uint32_t Offset;
More information about the cfe-commits
mailing list