This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dwarfdump] Help option output should be consistent with the command guide
ClosedPublic

Authored by gbreynoo on Apr 30 2021, 9:52 AM.

Details

Summary

The dwarfdump command guide shows the short options used as aliases but these are not found in the help text unless --show-hidden is used. Investigating other tools some follow this pattern, others like llvm-objdump show aliases with --help. This change fixes the help output to be consistent with the command guide.

As part of this change I updated cmdline.test, including some options that were missing testing.

Diff Detail

Event Timeline

gbreynoo created this revision.Apr 30 2021, 9:52 AM
gbreynoo requested review of this revision.Apr 30 2021, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2021, 9:52 AM
MaskRay accepted this revision.Apr 30 2021, 10:50 AM

Looks great!

llvm/test/tools/llvm-dwarfdump/cmdline.test
11–29

A bit weird that the aliasee spelling is -all while the option below is --all.

Suggest you change Alias for - strings while you are updating them.

This revision is now accepted and ready to land.Apr 30 2021, 10:50 AM
jhenderson added inline comments.May 4 2021, 1:08 AM
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
133–134

Nit: make sure to run clang-format.

gbreynoo updated this revision to Diff 343047.May 5 2021, 7:50 AM

Updated alias descriptions to use "--" and ran changes through clang format.