This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readelf] Make -W an alias of --wide
ClosedPublic

Authored by gbreynoo on Oct 13 2021, 8:33 AM.

Details

Summary

Currently -W and --wide are treated as two options as they are only included for gnu readelf compatibility and ignored. This change makes -W an alias of --wide to be consistent with other option aliases.

Diff Detail

Event Timeline

gbreynoo created this revision.Oct 13 2021, 8:33 AM
gbreynoo requested review of this revision.Oct 13 2021, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2021, 8:33 AM

Does this change --help output? If not, seems unnecessary?

Does this change --help output? If not, seems unnecessary?

We've got some downstream code that intends to iterate over all possibly specified options, regardless of their eventual impact on the behaviour of the tool. Without this change, the "W" and "wide" options would appear as separate entries, unlike other aliases, which is not desirable.

Plus, as @gbreynoo pointed out, this ensures consistency - in llvm-objdump the same options are aliases, rather than separate options.

Just to confirm, this does not change the help output.

MaskRay accepted this revision.Oct 14 2021, 11:17 AM
This revision is now accepted and ready to land.Oct 14 2021, 11:17 AM
This revision was automatically updated to reflect the committed changes.