================ @@ -210,24 +210,33 @@ static void verifyTables() { #endif } -void llvm::riscvExtensionsHelp() { +void llvm::riscvExtensionsHelp(std::map<StringRef, StringRef> llvmDescMap) { + outs() << "All available -march extensions for RISC-V\n\n"; - outs() << '\t' << left_justify("Name", 20) << "Version\n"; + outs() << '\t' << left_justify("Name", 20) << "Version"; + outs() << (llvmDescMap.empty() ? "\n" : "\tDescription\n"); RISCVISAInfo::OrderedExtensionMap ExtMap; for (const auto &E : SupportedExtensions) ExtMap[E.Name] = {E.Version.Major, E.Version.Minor}; - for (const auto &E : ExtMap) - outs() << format("\t%-20s%d.%d\n", E.first.c_str(), E.second.MajorVersion, + for (const auto &E : ExtMap) { + outs() << format("\t%-20s%d.%d", E.first.c_str(), E.second.MajorVersion, E.second.MinorVersion); + outs() << (llvmDescMap.empty() ? "\n" ---------------- DavidSpickett wrote:
> Basically with this feature we have an option to skip "Description" column at > all. I see what you mean now. Yes I agree, if there's some architecture that provides 0 descriptions then having it doesn't make any sense. https://github.com/llvm/llvm-project/pull/66715 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits