Skip to content

Commit 9941db4

Browse files
committed
llvm-wrapper: adapt for LLVM API changes
No functional changes intended. Adapts llvm-wrapper for llvm/llvm-project@65e57bb. 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
1 parent 67626b8 commit 9941db4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1120,9 +1120,15 @@ struct LLVMRustThinLTOData {
11201120

11211121
// Not 100% sure what these are, but they impact what's internalized and
11221122
// what's inlined across modules, I believe.
1123+
#if LLVM_VERSION_GE(17, 0)
1124+
DenseMap<StringRef, FunctionImporter::ImportMapTy> ImportLists;
1125+
DenseMap<StringRef, FunctionImporter::ExportSetTy> ExportLists;
1126+
DenseMap<StringRef, GVSummaryMapTy> ModuleToDefinedGVSummaries;
1127+
#else
11231128
StringMap<FunctionImporter::ImportMapTy> ImportLists;
11241129
StringMap<FunctionImporter::ExportSetTy> ExportLists;
11251130
StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries;
1131+
#endif
11261132
StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR;
11271133

11281134
LLVMRustThinLTOData() : Index(/* HaveGVs = */ false) {}

0 commit comments

Comments
 (0)