mirror of
https://github.com/RPCS3/llvm.git
synced 2026-08-27 11:01:30 -04:00
ef56f2df64
The "knownValuesUnicode" test in the patch fails on ppc64 and arm64 bots. Reverting while I investigate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325115 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
655 B
C++
21 lines
655 B
C++
//===-- Support/DJB.cpp ---DJB Hash -----------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains support for the DJ Bernstein hash function.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Support/DJB.h"
|
|
|
|
uint32_t llvm::djbHash(StringRef Buffer, uint32_t H) {
|
|
for (char C : Buffer.bytes())
|
|
H = ((H << 5) + H) + C;
|
|
return H;
|
|
}
|