From 9941db45125f03f6f2c2e491b747e66f0f133415 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Sat, 5 Aug 2023 10:53:34 +0000 Subject: [PATCH] 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 --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index ebf8a50ae8b85..a986fa28f7881 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 ImportLists; + DenseMap ExportLists; + DenseMap ModuleToDefinedGVSummaries; +#else StringMap ImportLists; StringMap ExportLists; StringMap ModuleToDefinedGVSummaries; +#endif StringMap> ResolvedODR; LLVMRustThinLTOData() : Index(/* HaveGVs = */ false) {}