about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2025-03-14 05:31:21 +0000
committerGitHub <noreply@github.com>2025-03-14 05:31:21 +0000
commit0b643dfc799427c2657e8d5033f4284ecb1c6764 (patch)
treeca52a531d99270def1c2db7ff2a5cbd1ba076cfc /compiler/rustc_llvm/llvm-wrapper
parent3d01217ccdf6d33c5f3c0318b7c4434318828a88 (diff)
parent51fd35868aae6d6665a7e688471a34fd95b9a760 (diff)
downloadrust-0b643dfc799427c2657e8d5033f4284ecb1c6764.tar.gz
rust-0b643dfc799427c2657e8d5033f4284ecb1c6764.zip
Merge pull request #4226 from rust-lang/rustup-2025-03-14
Automatic Rustup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index bc3d4d6f83a..86f1bcc46ee 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1682,12 +1682,21 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
 #endif
 
   // 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)));
+  for (auto &Name : Data->Index.cfiFunctionDecls().symbols())
+    CfiFunctionDecls.insert(
+        GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
+#else
   for (auto &Name : Data->Index.cfiFunctionDefs())
     CfiFunctionDefs.insert(
         GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
   for (auto &Name : Data->Index.cfiFunctionDecls())
     CfiFunctionDecls.insert(
         GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
+#endif
 
 #if LLVM_VERSION_GE(20, 0)
   Key = llvm::computeLTOCacheKey(conf, Data->Index, ModId, ImportList,