Handle some renamed ThinLTO functions
This commit is contained in:
parent
7be0b23b69
commit
ae5b350d77
1 changed files with 8 additions and 0 deletions
|
@ -922,7 +922,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
|
||||||
GlobalValue::LinkageTypes NewLinkage) {
|
GlobalValue::LinkageTypes NewLinkage) {
|
||||||
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
|
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
|
||||||
};
|
};
|
||||||
|
#if LLVM_VERSION_GE(8, 0)
|
||||||
|
thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
|
||||||
|
#else
|
||||||
thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);
|
thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
|
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
|
||||||
// callback below. This callback below will dictate the linkage for all
|
// callback below. This callback below will dictate the linkage for all
|
||||||
|
@ -977,7 +981,11 @@ extern "C" bool
|
||||||
LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
|
LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
|
||||||
Module &Mod = *unwrap(M);
|
Module &Mod = *unwrap(M);
|
||||||
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
|
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier());
|
||||||
|
#if LLVM_VERSION_GE(8, 0)
|
||||||
|
thinLTOResolvePrevailingInModule(Mod, DefinedGlobals);
|
||||||
|
#else
|
||||||
thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
|
thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals);
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue