|
25 | 25 | #include "clang/Lex/Preprocessor.h"
|
26 | 26 | #include "llvm/ADT/APInt.h"
|
27 | 27 | #include "llvm/ADT/Hashing.h"
|
| 28 | +#include "llvm/ADT/STLExtras.h" |
28 | 29 | #include "llvm/ADT/SmallString.h"
|
29 | 30 | #include "llvm/ADT/SmallVector.h"
|
30 | 31 | #include "llvm/ADT/Statistic.h"
|
31 | 32 | #include "llvm/ADT/StringRef.h"
|
32 |
| -#include "llvm/ADT/STLExtras.h" |
33 | 33 | #include "llvm/Support/Allocator.h"
|
34 | 34 | #include "llvm/Support/Capacity.h"
|
35 | 35 | #include "llvm/Support/Errc.h"
|
36 | 36 | #include "llvm/Support/ErrorHandling.h"
|
37 | 37 | #include "llvm/Support/FileSystem.h"
|
38 | 38 | #include "llvm/Support/Path.h"
|
39 | 39 | #include "llvm/Support/VirtualFileSystem.h"
|
| 40 | +#include "llvm/Support/xxhash.h" |
40 | 41 | #include <algorithm>
|
41 | 42 | #include <cassert>
|
42 | 43 | #include <cstddef>
|
@@ -282,10 +283,10 @@ std::string HeaderSearch::getCachedModuleFileNameImpl(StringRef ModuleName,
|
282 | 283 | if (getModuleMap().canonicalizeModuleMapPath(CanonicalPath))
|
283 | 284 | return {};
|
284 | 285 |
|
285 |
| - llvm::hash_code Hash = llvm::hash_combine(CanonicalPath.str().lower()); |
| 286 | + auto Hash = llvm::xxh3_64bits(CanonicalPath.str().lower()); |
286 | 287 |
|
287 | 288 | SmallString<128> HashStr;
|
288 |
| - llvm::APInt(64, size_t(Hash)).toStringUnsigned(HashStr, /*Radix*/36); |
| 289 | + llvm::APInt(64, Hash).toStringUnsigned(HashStr, /*Radix*/36); |
289 | 290 | llvm::sys::path::append(Result, ModuleName + "-" + HashStr + ".pcm");
|
290 | 291 | }
|
291 | 292 | return Result.str().str();
|
|
0 commit comments