diff options
| author | bors <bors@rust-lang.org> | 2025-04-29 16:31:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-29 16:31:27 +0000 |
| commit | 74509131e85a97353c67c503ea32e148a56cf4bd (patch) | |
| tree | 293f2e2e50223905110b3f460c08ee5381742ee1 /compiler/rustc_llvm/llvm-wrapper | |
| parent | efcbb94dccbe0fcc1076f031f88332db4a6a2a52 (diff) | |
| parent | ff6a9800a38f30161ea7f819e2808f9bf97b5864 (diff) | |
| download | rust-74509131e85a97353c67c503ea32e148a56cf4bd.tar.gz rust-74509131e85a97353c67c503ea32e148a56cf4bd.zip | |
Auto merge of #140474 - tgross35:rollup-rdkao89, r=tgross35
Rollup of 7 pull requests Successful merges: - #138344 (Enable `reliable_f16_math` on x86) - #139909 (implement or-patterns for pattern types) - #140392 (compiletest: Remove the libtest-based executor and its dependency) - #140400 (PassWrapper: adapt for llvm/llvm-project@d3d856ad8469) - #140422 (unwind: bump `unwinding` dependency to 0.2.6) - #140432 (Update documentation for `fn target_config`) - #140433 (Replace the \01__gnu_mcount_nc to LLVM intrinsic for additional ARM targets) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 8bee051dd4c..ebe8eb57f2c 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -1365,7 +1365,12 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, size_t num_modules, // Convert the preserved symbols set from string to GUID, this is then needed // for internalization. for (size_t i = 0; i < num_symbols; i++) { +#if LLVM_VERSION_GE(21, 0) + auto GUID = + GlobalValue::getGUIDAssumingExternalLinkage(preserved_symbols[i]); +#else auto GUID = GlobalValue::getGUID(preserved_symbols[i]); +#endif Ret->GUIDPreservedSymbols.insert(GUID); } @@ -1685,11 +1690,11 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut, // Based on the 'InProcessThinBackend' constructor in LLVM #if LLVM_VERSION_GE(21, 0) for (auto &Name : Data->Index.cfiFunctionDefs().symbols()) - CfiFunctionDefs.insert( - GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name))); + CfiFunctionDefs.insert(GlobalValue::getGUIDAssumingExternalLinkage( + GlobalValue::dropLLVMManglingEscape(Name))); for (auto &Name : Data->Index.cfiFunctionDecls().symbols()) - CfiFunctionDecls.insert( - GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name))); + CfiFunctionDecls.insert(GlobalValue::getGUIDAssumingExternalLinkage( + GlobalValue::dropLLVMManglingEscape(Name))); #else for (auto &Name : Data->Index.cfiFunctionDefs()) CfiFunctionDefs.insert( |
