Skip to content

Commit 39f93d3

Browse files
authored
Rollup merge of #109659 - krasimirgg:llvm17lto, r=nikic
llvm-wrapper: adapt for LLVM API change Adapts the wrapper for the LLVM commit llvm/llvm-project@377e131. Found by the experimental rust + LLVM @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/18141#01872217-de22-4826-b0d6-2dd4884d8893
2 parents 1db9eae + 684e7a5 commit 39f93d3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+10-7
Original file line numberDiff line numberDiff line change
@@ -1158,13 +1158,6 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
11581158
// Otherwise, we sometimes lose `static` values -- see #60184.
11591159
computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols,
11601160
deadIsPrevailing, /* ImportEnabled = */ false);
1161-
ComputeCrossModuleImport(
1162-
Ret->Index,
1163-
Ret->ModuleToDefinedGVSummaries,
1164-
Ret->ImportLists,
1165-
Ret->ExportLists
1166-
);
1167-
11681161
// Resolve LinkOnce/Weak symbols, this has to be computed early be cause it
11691162
// impacts the caching.
11701163
//
@@ -1181,6 +1174,16 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
11811174
return true;
11821175
return Prevailing->second == S;
11831176
};
1177+
ComputeCrossModuleImport(
1178+
Ret->Index,
1179+
Ret->ModuleToDefinedGVSummaries,
1180+
#if LLVM_VERSION_GE(17, 0)
1181+
isPrevailing,
1182+
#endif
1183+
Ret->ImportLists,
1184+
Ret->ExportLists
1185+
);
1186+
11841187
auto recordNewLinkage = [&](StringRef ModuleIdentifier,
11851188
GlobalValue::GUID GUID,
11861189
GlobalValue::LinkageTypes NewLinkage) {

0 commit comments

Comments
 (0)