Skip to content

Commit

Permalink
llvm-wrapper: adapt for LLVM API change
Browse files Browse the repository at this point in the history
Adapts the wrapper for the LLVM commit llvm/llvm-project@377e131.
  • Loading branch information
krasimirgg committed Mar 27, 2023
1 parent 7a06007 commit 684e7a5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,13 +1158,6 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
// Otherwise, we sometimes lose `static` values -- see #60184.
computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols,
deadIsPrevailing, /* ImportEnabled = */ false);
ComputeCrossModuleImport(
Ret->Index,
Ret->ModuleToDefinedGVSummaries,
Ret->ImportLists,
Ret->ExportLists
);

// Resolve LinkOnce/Weak symbols, this has to be computed early be cause it
// impacts the caching.
//
Expand All @@ -1181,6 +1174,16 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
return true;
return Prevailing->second == S;
};
ComputeCrossModuleImport(
Ret->Index,
Ret->ModuleToDefinedGVSummaries,
#if LLVM_VERSION_GE(17, 0)
isPrevailing,
#endif
Ret->ImportLists,
Ret->ExportLists
);

auto recordNewLinkage = [&](StringRef ModuleIdentifier,
GlobalValue::GUID GUID,
GlobalValue::LinkageTypes NewLinkage) {
Expand Down

0 comments on commit 684e7a5

Please sign in to comment.