#include "clang/Basic/FileManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Version.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
unsigned R = 5381;
for (unsigned I = 0; I != N; ++I)
if (IdentifierInfo *II = Sel.getIdentifierInfoForSlot(I))
- R = clang::BernsteinHashPartial(II->getName(), II->getLength(), R);
+ R = llvm::HashString(II->getName(), R);
return R;
}
}
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.
typedef PCHStatData data_type;
static unsigned ComputeHash(const char *path) {
- return BernsteinHash(path);
+ return llvm::HashString(path);
}
static internal_key_type GetInternalKey(const char *path) { return path; }
#include "clang/Basic/Version.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/Bitcode/BitstreamWriter.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
typedef const data_type& data_type_ref;
static unsigned ComputeHash(const char *path) {
- return BernsteinHash(path);
+ return llvm::HashString(path);
}
std::pair<unsigned,unsigned>
unsigned R = 5381;
for (unsigned I = 0; I != N; ++I)
if (IdentifierInfo *II = Sel.getIdentifierInfoForSlot(I))
- R = clang::BernsteinHashPartial(II->getName(), II->getLength(), R);
+ R = llvm::HashString(II->getName(), R);
return R;
}
: Writer(Writer), PP(PP) { }
static unsigned ComputeHash(const IdentifierInfo* II) {
- return clang::BernsteinHash(II->getName());
+ return llvm::HashString(II->getName());
}
std::pair<unsigned,unsigned>
#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;
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>
}
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.