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 @@ -953,7 +953,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
953
953
GlobalValue::LinkageTypes NewLinkage) {
954
954
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
955
955
};
956
+ #if LLVM_VERSION_GE(8, 0)
957
+ thinLTOResolvePrevailingInIndex (Ret->Index , isPrevailing, recordNewLinkage);
958
+ #else
956
959
thinLTOResolveWeakForLinkerInIndex (Ret->Index , isPrevailing, recordNewLinkage);
960
+ #endif
957
961
958
962
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
959
963
// callback below. This callback below will dictate the linkage for all
@@ -1016,7 +1020,11 @@ extern "C" bool
1016
1020
LLVMRustPrepareThinLTOResolveWeak (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1017
1021
Module &Mod = *unwrap (M);
1018
1022
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries .lookup (Mod.getModuleIdentifier ());
1023
+ #if LLVM_VERSION_GE(8, 0)
1024
+ thinLTOResolvePrevailingInModule (Mod, DefinedGlobals);
1025
+ #else
1019
1026
thinLTOResolveWeakForLinkerModule (Mod, DefinedGlobals);
1027
+ #endif
1020
1028
return true ;
1021
1029
}
1022
1030
You can’t perform that action at this time.
0 commit comments