This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objdump] Document --mattr=help in --help output
ClosedPublic

Authored by DavidSpickett on Nov 30 2020, 2:51 AM.

Details

Summary

This does the same as --mcpu=help but was only
documented in the user guide.

  • Added a test for both options.
  • Corrected the single dash in -mcpu=help text.

Diff Detail

Event Timeline

DavidSpickett created this revision.Nov 30 2020, 2:51 AM
Herald added a reviewer: MaskRay. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
DavidSpickett requested review of this revision.Nov 30 2020, 2:51 AM
DavidSpickett added a comment.EditedNov 30 2020, 2:54 AM

This is a follow up to discussion on: https://reviews.llvm.org/D92217

I have not updated the man page (llvm/docs/llvm-objdump.1) since it seems to have fallen behind in general. If you think it's worth updating the whole thing I'll do that as its own change, it's mostly replacing - with --.

(some talk about the manpage on https://reviews.llvm.org/D63606)

It's probably worth writing a test that shows how --mattr=help behaves (if it isn't tested already), given that it is being documented. If you'd prefer to do that in a separate patch, that's fine by me, or you can do it as part of this patch. The test would not want to be much more than that the help is printed when requested (it doesn't need to test the contents of the help output).

llvm/tools/llvm-objdump/llvm-objdump.cpp
231–232

Please run clang-format on the modified code.

DavidSpickett updated this revision to Diff 308315.EditedNov 30 2020, 3:56 AM
  • Added test for mcpu/mattr=help
  • clang-format
DavidSpickett edited the summary of this revision. (Show Details)Nov 30 2020, 3:57 AM
jhenderson accepted this revision.Nov 30 2020, 4:16 AM

LGTM, once the two suggestions have been addressed.

llvm/test/tools/llvm-objdump/mattr-mcpu-help.test
8

Most newer binutils tests are using '##' as comment markers to help the comment stand out from the FileCheck and lit directives.

11

Not strictly required, but it enables users to add more yaml documents to the test should it ever get extended.

This revision is now accepted and ready to land.Nov 30 2020, 4:16 AM
  • Double # for comment
  • Add dashes to ELF header
DavidSpickett marked 3 inline comments as done.Nov 30 2020, 4:51 AM
This revision was landed with ongoing or failed builds.Nov 30 2020, 4:53 AM
This revision was automatically updated to reflect the committed changes.