28 for (
auto Value : Longs)
31 const uint8_t *Remainder =
reinterpret_cast<const uint8_t *
>(Longs.end());
36 if (RemainderSize >= 2) {
38 Result ^=
static_cast<uint32_t>(Value);
44 if (RemainderSize == 1) {
45 Result ^= *(Remainder++);
48 const uint32_t toLowerMask = 0x20202020;
49 Result |= toLowerMask;
50 Result ^= (Result >> 11);
52 return Result ^ (Result >> 16);
63 reinterpret_cast<const ulittle32_t *>(Buffer.data()),
70 Buffer = Buffer.slice(Items.size() *
sizeof(
ulittle32_t));
71 for (uint8_t Item : Buffer) {
77 return Hash * 1664525U + 1013904223U;
83 JC.
update(makeArrayRef<char>(reinterpret_cast<const char *>(Buf.
data()),
uint32_t hashBufferV8(ArrayRef< uint8_t > Data)
uint32_t hashStringV2(StringRef Str)
This class represents lattice values for constants.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
uint32_t hashStringV1(StringRef Str)
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
size_t size() const
size - Get the array size.
LLVM Value Representation.
void update(ArrayRef< char > Data)
StringRef - Represent a constant reference to a string, i.e.