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,
953953 GlobalValue::LinkageTypes NewLinkage) {
954954 ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
955955 };
956+ #if LLVM_VERSION_GE(8, 0)
957+ thinLTOResolvePrevailingInIndex (Ret->Index , isPrevailing, recordNewLinkage);
958+ #else
956959 thinLTOResolveWeakForLinkerInIndex (Ret->Index , isPrevailing, recordNewLinkage);
960+ #endif
957961
958962 // Here we calculate an `ExportedGUIDs` set for use in the `isExported`
959963 // callback below. This callback below will dictate the linkage for all
@@ -1016,7 +1020,11 @@ extern "C" bool
10161020LLVMRustPrepareThinLTOResolveWeak (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
10171021 Module &Mod = *unwrap (M);
10181022 const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries .lookup (Mod.getModuleIdentifier ());
1023+ #if LLVM_VERSION_GE(8, 0)
1024+ thinLTOResolvePrevailingInModule (Mod, DefinedGlobals);
1025+ #else
10191026 thinLTOResolveWeakForLinkerModule (Mod, DefinedGlobals);
1027+ #endif
10201028 return true ;
10211029}
10221030
You can’t perform that action at this time.
0 commit comments