[PATCH] D102173: [llvm-readelf] Help option output should be consistent with the command guide
Owen Reynolds via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 10 08:06:55 PDT 2021
gbreynoo created this revision.
gbreynoo added reviewers: MaskRay, kzhuravl, rahmanl.
Herald added a subscriber: rupprecht.
Herald added a reviewer: jhenderson.
gbreynoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The readelf command guide shows the short options used as aliases but these are not found in the help text unless --show-hidden is used, other tools show aliases with --help. This change fixes the help output to be consistent with the command guide.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102173
Files:
llvm/tools/llvm-readobj/llvm-readobj.cpp
Index: llvm/tools/llvm-readobj/llvm-readobj.cpp
===================================================================
--- llvm/tools/llvm-readobj/llvm-readobj.cpp
+++ llvm/tools/llvm-readobj/llvm-readobj.cpp
@@ -72,7 +72,7 @@
cl::desc("Equivalent to setting: --file-headers, --program-headers, "
"--section-headers"));
cl::alias HeadersShort("e", cl::desc("Alias for --headers"),
- cl::aliasopt(Headers));
+ cl::aliasopt(Headers), cl::NotHidden);
// --wide, -W
cl::opt<bool>
@@ -131,7 +131,8 @@
// --notes, -n
cl::opt<bool> Notes("notes", cl::desc("Display the ELF notes in the file"));
- cl::alias NotesShort("n", cl::desc("Alias for --notes"), cl::aliasopt(Notes));
+ cl::alias NotesShort("n", cl::desc("Alias for --notes"), cl::aliasopt(Notes),
+ cl::NotHidden);
// --dyn-relocations
cl::opt<bool> DynRelocs("dyn-relocations",
@@ -166,9 +167,8 @@
// --unwind, -u
cl::opt<bool> UnwindInfo("unwind",
cl::desc("Display unwind information"));
- cl::alias UnwindInfoShort("u",
- cl::desc("Alias for --unwind"),
- cl::aliasopt(UnwindInfo));
+ cl::alias UnwindInfoShort("u", cl::desc("Alias for --unwind"),
+ cl::aliasopt(UnwindInfo), cl::NotHidden);
// --dynamic-table, --dynamic, -d
cl::opt<bool> DynamicTable("dynamic-table",
@@ -196,7 +196,8 @@
cl::desc("Display the specified section(s) as a list of strings"),
cl::ZeroOrMore);
cl::alias StringDumpShort("p", cl::desc("Alias for --string-dump"),
- cl::aliasopt(StringDump), cl::Prefix);
+ cl::aliasopt(StringDump), cl::Prefix,
+ cl::NotHidden);
// --hex-dump, -x
cl::list<std::string>
@@ -204,7 +205,7 @@
cl::desc("Display the specified section(s) as hexadecimal bytes"),
cl::ZeroOrMore);
cl::alias HexDumpShort("x", cl::desc("Alias for --hex-dump"),
- cl::aliasopt(HexDump), cl::Prefix);
+ cl::aliasopt(HexDump), cl::Prefix, cl::NotHidden);
// --demangle, -C
cl::opt<bool> Demangle("demangle",
@@ -340,7 +341,7 @@
VersionInfo("version-info",
cl::desc("Display ELF version sections (if present)"));
cl::alias VersionInfoShort("V", cl::desc("Alias for -version-info"),
- cl::aliasopt(VersionInfo));
+ cl::aliasopt(VersionInfo), cl::NotHidden);
// --elf-section-groups, --section-groups, -g
cl::opt<bool> SectionGroups("elf-section-groups",
@@ -349,14 +350,14 @@
cl::desc("Alias for -elf-sections-groups"),
cl::aliasopt(SectionGroups));
cl::alias SectionGroupsShort("g", cl::desc("Alias for -elf-sections-groups"),
- cl::aliasopt(SectionGroups));
+ cl::aliasopt(SectionGroups), cl::NotHidden);
// --elf-hash-histogram, --histogram, -I
cl::opt<bool> HashHistogram(
"elf-hash-histogram",
cl::desc("Display bucket list histogram for hash sections"));
cl::alias HashHistogramShort("I", cl::desc("Alias for -elf-hash-histogram"),
- cl::aliasopt(HashHistogram));
+ cl::aliasopt(HashHistogram), cl::NotHidden);
cl::alias HistogramAlias("histogram",
cl::desc("Alias for --elf-hash-histogram"),
cl::aliasopt(HashHistogram));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102173.344062.patch
Type: text/x-patch
Size: 3586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210510/8defbea3/attachment.bin>
More information about the llvm-commits
mailing list