about summary refs log tree commit diff
path: root/compiler/rustc_llvm
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-08-07 16:47:56 +0200
committerGitHub <noreply@github.com>2023-08-07 16:47:56 +0200
commit1d82946e52d8220da0859d80e68cb0cc3266cc5e (patch)
tree834e42fb18a24718e092002fe9329a762f32521d /compiler/rustc_llvm
parent9b1f9433db95f1c5e02c0030e6ab8ac37ea6dbca (diff)
parent9941db45125f03f6f2c2e491b747e66f0f133415 (diff)
downloadrust-1d82946e52d8220da0859d80e68cb0cc3266cc5e.tar.gz
rust-1d82946e52d8220da0859d80e68cb0cc3266cc5e.zip
Rollup merge of #114510 - krasimirgg:llvm-17-cmi, r=nikic
llvm-wrapper: adapt for LLVM API changes

No functional changes intended.

Adapts llvm-wrapper for https://github.com/llvm/llvm-project/commit/65e57bbed06d55cab7bb64d54891d33ccb2d4159.

Found by our experimental rust + llvm @ HEAD CI:
https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/21304#0189c526-86cd-4db9-bdbc-dd0132dfc22b/197-500
Diffstat (limited to 'compiler/rustc_llvm')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index ebf8a50ae8b..a986fa28f78 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -1120,9 +1120,15 @@ 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(17, 0)
+  DenseMap<StringRef, FunctionImporter::ImportMapTy> ImportLists;
+  DenseMap<StringRef, FunctionImporter::ExportSetTy> ExportLists;
+  DenseMap<StringRef, GVSummaryMapTy> ModuleToDefinedGVSummaries;
+#else
   StringMap<FunctionImporter::ImportMapTy> ImportLists;
   StringMap<FunctionImporter::ExportSetTy> ExportLists;
   StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries;
+#endif
   StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
 
   LLVMRustThinLTOData() : Index(/* HaveGVs = */ false) {}