@@ -266,8 +266,8 @@ static Optional<Reloc::Model> fromRust(LLVMRustRelocMode RustReloc) {
266
266
267
267
#ifdef LLVM_RUSTLLVM
268
268
// / getLongestEntryLength - Return the length of the longest entry in the table.
269
- // /
270
- static size_t getLongestEntryLength (ArrayRef<SubtargetFeatureKV > Table) {
269
+ template < typename KV>
270
+ static size_t getLongestEntryLength (ArrayRef<KV > Table) {
271
271
size_t MaxLen = 0 ;
272
272
for (auto &I : Table)
273
273
MaxLen = std::max (MaxLen, std::strlen (I.Key ));
@@ -279,7 +279,7 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM) {
279
279
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo ();
280
280
const Triple::ArchType HostArch = Triple (sys::getProcessTriple ()).getArch ();
281
281
const Triple::ArchType TargetArch = Target->getTargetTriple ().getArch ();
282
- const ArrayRef<SubtargetFeatureKV > CPUTable = MCInfo->getCPUTable ();
282
+ const ArrayRef<SubtargetSubTypeKV > CPUTable = MCInfo->getCPUTable ();
283
283
unsigned MaxCPULen = getLongestEntryLength (CPUTable);
284
284
285
285
printf (" Available CPUs for this target:\n " );
@@ -289,7 +289,7 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM) {
289
289
MaxCPULen, " native" , (int )HostCPU.size (), HostCPU.data ());
290
290
}
291
291
for (auto &CPU : CPUTable)
292
- printf (" %-*s - %s. \n " , MaxCPULen, CPU.Key , CPU. Desc );
292
+ printf (" %-*s\n " , MaxCPULen, CPU.Key );
293
293
printf (" \n " );
294
294
}
295
295
0 commit comments