File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -922,7 +922,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
922922 GlobalValue::LinkageTypes NewLinkage) {
923923 ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
924924 };
925+ #if LLVM_VERSION_GE(8, 0)
926+ thinLTOResolvePrevailingInIndex (Ret->Index , isPrevailing, recordNewLinkage);
927+ #else
925928 thinLTOResolveWeakForLinkerInIndex (Ret->Index , isPrevailing, recordNewLinkage);
929+ #endif
926930
927931 // Here we calculate an `ExportedGUIDs` set for use in the `isExported`
928932 // callback below. This callback below will dictate the linkage for all
@@ -977,7 +981,11 @@ extern "C" bool
977981LLVMRustPrepareThinLTOResolveWeak (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
978982 Module &Mod = *unwrap (M);
979983 const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries .lookup (Mod.getModuleIdentifier ());
984+ #if LLVM_VERSION_GE(8, 0)
985+ thinLTOResolvePrevailingInModule (Mod, DefinedGlobals);
986+ #else
980987 thinLTOResolveWeakForLinkerModule (Mod, DefinedGlobals);
988+ #endif
981989 return true ;
982990}
983991
You can’t perform that action at this time.
0 commit comments