diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Support/xxhash.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Support/xxhash.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/xxhash.h b/llvm/include/llvm/Support/xxhash.h index f7ca460188a..6fd67ff9ce1 100644 --- a/llvm/include/llvm/Support/xxhash.h +++ b/llvm/include/llvm/Support/xxhash.h @@ -38,10 +38,12 @@ #ifndef LLVM_SUPPORT_XXHASH_H #define LLVM_SUPPORT_XXHASH_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" namespace llvm { uint64_t xxHash64(llvm::StringRef Data); +uint64_t xxHash64(llvm::ArrayRef<uint8_t> Data); } #endif diff --git a/llvm/lib/Support/xxhash.cpp b/llvm/lib/Support/xxhash.cpp index df643f9bd63..e9dceed2c4a 100644 --- a/llvm/lib/Support/xxhash.cpp +++ b/llvm/lib/Support/xxhash.cpp @@ -132,3 +132,7 @@ uint64_t llvm::xxHash64(StringRef Data) { return H64; } + +uint64_t llvm::xxHash64(ArrayRef<uint8_t> Data) { + return xxHash64({(const char *)Data.data(), Data.size()}); +} |

