[llvm] [Hashing] Replace CityHash mixers with xxh3 (PR #194567)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat May 9 16:17:34 PDT 2026


================
@@ -38,19 +38,18 @@
 #ifndef LLVM_SUPPORT_XXHASH_H
 #define LLVM_SUPPORT_XXHASH_H
 
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Compiler.h"
+#include <cstddef>
+#include <cstdint>
 
 namespace llvm {
 
-LLVM_ABI uint64_t xxHash64(llvm::StringRef Data);
-LLVM_ABI uint64_t xxHash64(llvm::ArrayRef<uint8_t> Data);
+// Deprecated pre-xxh3 64-bit hash.
+LLVM_ABI uint64_t xxHash64(const uint8_t *data, size_t len);
 
-LLVM_ABI uint64_t xxh3_64bits(ArrayRef<uint8_t> data);
-inline uint64_t xxh3_64bits(StringRef data) {
-  return xxh3_64bits(ArrayRef(data.bytes_begin(), data.size()));
-}
+/// XXH3's 64-bit variant. Inline ArrayRef and StringRef overloads live in
----------------
MaskRay wrote:

Added include

https://github.com/llvm/llvm-project/pull/194567


More information about the llvm-commits mailing list