@@ -267,7 +267,8 @@ static Optional<Reloc::Model> fromRust(LLVMRustRelocMode RustReloc) {
267
267
#ifdef LLVM_RUSTLLVM
268
268
// / getLongestEntryLength - Return the length of the longest entry in the table.
269
269
// /
270
- static size_t getLongestEntryLength (ArrayRef<SubtargetFeatureKV> Table) {
270
+ template <typename T>
271
+ static size_t getLongestEntryLength (ArrayRef<T> Table) {
271
272
size_t MaxLen = 0 ;
272
273
for (auto &I : Table)
273
274
MaxLen = std::max (MaxLen, std::strlen (I.Key ));
@@ -279,7 +280,7 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM) {
279
280
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo ();
280
281
const Triple::ArchType HostArch = Triple (sys::getProcessTriple ()).getArch ();
281
282
const Triple::ArchType TargetArch = Target->getTargetTriple ().getArch ();
282
- const ArrayRef<SubtargetFeatureKV > CPUTable = MCInfo->getCPUTable ();
283
+ const ArrayRef<SubtargetSubTypeKV > CPUTable = MCInfo->getCPUTable ();
283
284
unsigned MaxCPULen = getLongestEntryLength (CPUTable);
284
285
285
286
printf (" Available CPUs for this target:\n " );
@@ -289,7 +290,7 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM) {
289
290
MaxCPULen, " native" , (int )HostCPU.size (), HostCPU.data ());
290
291
}
291
292
for (auto &CPU : CPUTable)
292
- printf (" %-*s - %s. \n " , MaxCPULen, CPU.Key , CPU. Desc );
293
+ printf (" %-*s\n " , MaxCPULen, CPU.Key );
293
294
printf (" \n " );
294
295
}
295
296
@@ -913,7 +914,14 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
913
914
GlobalValue::LinkageTypes NewLinkage) {
914
915
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
915
916
};
916
- #if LLVM_VERSION_GE(8, 0)
917
+ #if LLVM_VERSION_GE(9, 0)
918
+ thinLTOResolvePrevailingInIndex (
919
+ Ret->Index ,
920
+ isPrevailing,
921
+ recordNewLinkage,
922
+ Ret->GUIDPreservedSymbols
923
+ );
924
+ #elif LLVM_VERSION_GE(8, 0)
917
925
thinLTOResolvePrevailingInIndex (Ret->Index , isPrevailing, recordNewLinkage);
918
926
#else
919
927
thinLTOResolveWeakForLinkerInIndex (Ret->Index , isPrevailing, recordNewLinkage);
0 commit comments