[PATCH] D79618: [llvm-dwarfdump] Make commandline arguments consistent.
Xing GUO via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 01:34:27 PDT 2020
Higuoxing created this revision.
Higuoxing added reviewers: jhenderson, aprantl, dblaikie.
Herald added subscribers: llvm-commits, cmtice, MaskRay.
Herald added a project: LLVM.
Currently, llvm-dwarfdump's help message has two issues.
1. Most long options are printed in `--long-option`, except for some "debug" options, e.g., `-apple-names`, `-debug-addr`.
2. Most options are printed with consistent indention, except for some "debug" options.
This patch helps resolve these two issues.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79618
Files:
llvm/test/tools/llvm-dwarfdump/cmdline.test
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
Index: llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
===================================================================
--- llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -72,10 +72,7 @@
return ValueOptional;
}
- void printOptionInfo(const Option &O, size_t GlobalWidth) const {
- outs() << " -" << O.ArgStr;
- Option::printHelpStr(O.HelpStr, GlobalWidth, getOptionWidth(O));
- }
+ StringRef getValueName() const override { return StringRef(); }
void printOptionDiff(const Option &O, OffsetOption V, OptVal Default,
size_t GlobalWidth) const {
Index: llvm/test/tools/llvm-dwarfdump/cmdline.test
===================================================================
--- llvm/test/tools/llvm-dwarfdump/cmdline.test
+++ llvm/test/tools/llvm-dwarfdump/cmdline.test
@@ -8,7 +8,7 @@
HELP: -help-list
HELP: -version
HELP: Section-specific Dump Options
-HELP: -debug-info - Dump the .debug_info section
+HELP: --debug-info - Dump the .debug_info section
HELP: -eh-frame
HELP: Specific Options
HELP: -diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79618.262830.patch
Type: text/x-patch
Size: 1122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200508/a120a62f/attachment.bin>
More information about the llvm-commits
mailing list