From: Nemanja Ivanovic Date: Thu, 30 Jan 2020 14:35:44 +0000 (-0600) Subject: Fix helptext for opt/llc after 14fc20ca6 X-Git-Tag: llvmorg-12-init~16301 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cc6e89c11de514fc9dfff99ca093f7013003e7f;p=platform%2Fupstream%2Fllvm.git Fix helptext for opt/llc after 14fc20ca6 The commit https://reviews.llvm.org/rG14fc20ca6 added some options to the X86 back end that cause the help text for opt/llc to become much harder to read. The issue is that the cl::value_desc is part of the option name and is used to compute the indentation of the description text (i.e. the maximum length option name is what everything aligns to). Since the commit puts a large number of characters into that text, everything is aligned to that width. This patch just reformats the option so that the description is contained in the description and the list of possible values is within the angle brackets. Note: the readability issue of the helptext was fixed in commit 70cbf8c71c510077baadcad305fea6f62e830b06, but the re-formatting wasn't added on that commit so I am still committing this. Differential revision: https://reviews.llvm.org/D73267 --- diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp index 59502c5..3b4e49b 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp @@ -86,12 +86,14 @@ cl::opt X86AlignBranchBoundary( cl::opt> X86AlignBranch( "x86-align-branch", cl::desc( - "Specify types of branches to align. The branches's types are " - "combination of jcc, fused, jmp, call, ret, indirect. jcc indicates " - "conditional jumps, fused indicates fused conditional jumps, jmp " - "indicates unconditional jumps, call indicates direct and indirect " - "calls, ret indicates rets, indirect indicates indirect jumps."), - cl::value_desc("(plus separated list of types)"), + "Specify types of branches to align (plus separated list of types):" + "\njcc indicates conditional jumps" + "\nfused indicates fused conditional jumps" + "\njmp indicates direct unconditional jumps" + "\ncall indicates direct and indirect calls" + "\nret indicates rets" + "\nindirect indicates indirect unconditional jumps"), + cl::value_desc("jcc, fused, jmp, call, ret, indirect"), cl::location(X86AlignBranchKindLoc)); cl::opt X86AlignBranchWithin32BBoundaries(