about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-18 17:49:45 +0200
committerGitHub <noreply@github.com>2024-09-18 17:49:45 +0200
commit48b90aaed38a85afafa45a15198a1472b84acf98 (patch)
tree77c1a5334ea155b5a2fd6ad5a045808df3cf417b /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent00c4be3df812c649798a2f127e2739643ba7e7d8 (diff)
parent3a352884f8112be3554e505e9d98819fd2be925a (diff)
downloadrust-48b90aaed38a85afafa45a15198a1472b84acf98.tar.gz
rust-48b90aaed38a85afafa45a15198a1472b84acf98.zip
Rollup merge of #130509 - krasimirgg:llvm-20-2, r=nikic
llvm-wrapper: adapt for LLVM API changes, second try

This is a re-work of https://github.com/rust-lang/rust/pull/129749 after LLVM brought back the APIs used by rust.

No functional changes intended.

`@rustbot` label: +llvm-main
r? `@nikic`
cc: `@tmandry`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 4a4ba165b57..7ceb50f2a9e 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1211,7 +1211,11 @@ struct LLVMRustThinLTOData {
   // Not 100% sure what these are, but they impact what's internalized and
   // what's inlined across modules, I believe.
 #if LLVM_VERSION_GE(18, 0)
+#if LLVM_VERSION_GE(20, 0)
+  FunctionImporter::ImportListsTy ImportLists;
+#else
   DenseMap<StringRef, FunctionImporter::ImportMapTy> ImportLists;
+#endif
   DenseMap<StringRef, FunctionImporter::ExportSetTy> ExportLists;
   DenseMap<StringRef, GVSummaryMapTy> ModuleToDefinedGVSummaries;
 #else