File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -922,7 +922,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
922
922
GlobalValue::LinkageTypes NewLinkage) {
923
923
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
924
924
};
925
+ #if LLVM_VERSION_GE(8, 0)
926
+ thinLTOResolvePrevailingInIndex (Ret->Index , isPrevailing, recordNewLinkage);
927
+ #else
925
928
thinLTOResolveWeakForLinkerInIndex (Ret->Index , isPrevailing, recordNewLinkage);
929
+ #endif
926
930
927
931
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
928
932
// callback below. This callback below will dictate the linkage for all
@@ -977,7 +981,11 @@ extern "C" bool
977
981
LLVMRustPrepareThinLTOResolveWeak (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
978
982
Module &Mod = *unwrap (M);
979
983
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries .lookup (Mod.getModuleIdentifier ());
984
+ #if LLVM_VERSION_GE(8, 0)
985
+ thinLTOResolvePrevailingInModule (Mod, DefinedGlobals);
986
+ #else
980
987
thinLTOResolveWeakForLinkerModule (Mod, DefinedGlobals);
988
+ #endif
981
989
return true ;
982
990
}
983
991
You can’t perform that action at this time.
0 commit comments