diff options
| author | bors <bors@rust-lang.org> | 2024-08-21 21:33:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-21 21:33:31 +0000 |
| commit | a32d4a0e822a29a6682e08b75a8df4c29c7fa9f1 (patch) | |
| tree | 83ae19d9c47cdab62a6c3495215d2659fc21bd82 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 6b678c57b63b3062fb97130b3617b82657f59c80 (diff) | |
| parent | 00e109f3d4c495015020fce604f3c2eb79b0d3ee (diff) | |
| download | rust-a32d4a0e822a29a6682e08b75a8df4c29c7fa9f1.tar.gz rust-a32d4a0e822a29a6682e08b75a8df4c29c7fa9f1.zip | |
Auto merge of #129370 - matthiaskrgr:rollup-g9117ee, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #128727 (bump conflicting_repr_hints lint to be shown in dependencies) - #129232 (Fix `thread::sleep` Duration-handling for ESP-IDF) - #129321 (Change neutral element of <fNN as iter::Sum> to neg_zero) - #129353 (llvm-wrapper: adapt for LLVM 20 API changes) - #129363 (Force `LC_ALL=C` for all run-make tests) - #129364 (safe transmute: gracefully bubble-up layout errors) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 283c4fbbb7c..9884ed15b8a 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -1607,8 +1607,13 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut, const auto &ExportList = Data->ExportLists.lookup(ModId); const auto &ResolvedODR = Data->ResolvedODR.lookup(ModId); const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(ModId); +#if LLVM_VERSION_GE(20, 0) + DenseSet<GlobalValue::GUID> CfiFunctionDefs; + DenseSet<GlobalValue::GUID> CfiFunctionDecls; +#else std::set<GlobalValue::GUID> CfiFunctionDefs; std::set<GlobalValue::GUID> CfiFunctionDecls; +#endif // Based on the 'InProcessThinBackend' constructor in LLVM for (auto &Name : Data->Index.cfiFunctionDefs()) @@ -1618,9 +1623,15 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut, CfiFunctionDecls.insert( GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name))); +#if LLVM_VERSION_GE(20, 0) + Key = llvm::computeLTOCacheKey(conf, Data->Index, ModId, ImportList, + ExportList, ResolvedODR, DefinedGlobals, + CfiFunctionDefs, CfiFunctionDecls); +#else llvm::computeLTOCacheKey(Key, conf, Data->Index, ModId, ImportList, ExportList, ResolvedODR, DefinedGlobals, CfiFunctionDefs, CfiFunctionDecls); +#endif LLVMRustStringWriteImpl(KeyOut, Key.c_str(), Key.size()); } |
