This is an archive of the discontinued LLVM Phabricator instance.

[docs][llvm-profdata] Prefer double-dash long options
ClosedPublic

Authored by MaskRay on Dec 28 2021, 7:32 PM.

Details

Summary

To match the --help message and most other utilities.

While here, change option:: -output=output to option:: --output=<output> and
omit the value name for the short options (convention of other utilities).

Diff Detail

Event Timeline

MaskRay requested review of this revision.Dec 28 2021, 7:32 PM
MaskRay created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 28 2021, 7:32 PM
snehasish accepted this revision.Dec 28 2021, 10:00 PM
snehasish added a subscriber: snehasish.

lgtm

llvm/docs/CommandGuide/llvm-profdata.rst
61

-o=<output>

to keep it consistent with the old documentation, also the dangling -o looks off.

This revision is now accepted and ready to land.Dec 28 2021, 10:00 PM
MaskRay added inline comments.Dec 29 2021, 3:23 PM
llvm/docs/CommandGuide/llvm-profdata.rst
61

(Thanks for review:) )

I try to avoid -o=<value> because it is odd (see D104889).

Omitting the value name for the short option is a style used by other tools like
https://llvm.org/docs/CommandGuide/llvm-objcopy.html

snehasish added inline comments.Dec 29 2021, 3:28 PM
llvm/docs/CommandGuide/llvm-profdata.rst
61

Thanks for the pointer and clarification. Makes sense to keep it consistent with the other tools.

MaskRay added a comment.EditedDec 30 2021, 10:36 AM

There is a bit other oddity like --show-prof-sym-list=[true|false] (--no- is more common); some options are not sorted alphabetically; --help option value names may not match the documentation.
If they are worth addressing, we can address them in future patches.

This revision was landed with ongoing or failed builds.Dec 30 2021, 10:37 AM
This revision was automatically updated to reflect the committed changes.