This is an archive of the discontinued LLVM Phabricator instance.

[llvm-nm] Remove one-dash long options except -arch
ClosedPublic

Authored by MaskRay on Jul 13 2021, 4:37 PM.

Details

Summary

The documentation and help messages have recommended the double-dash forms for
quite a while. Remove one-dash long options which are not recognized by GNU
style getopt_long.

-arch is kept as it is in the manpage of classic nm
https://keith.github.io/xcode-man-pages/nm.1.html

Note: the dyldinfo related options don't have a test.

Diff Detail

Event Timeline

MaskRay created this revision.Jul 13 2021, 4:37 PM
MaskRay requested review of this revision.Jul 13 2021, 4:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2021, 4:37 PM
jhenderson accepted this revision.Jul 14 2021, 1:46 AM

LGTM. Is there a test-case that uses -arch with only a single dash? Since that's a special case, we might want to test it explicitly.

This revision is now accepted and ready to land.Jul 14 2021, 1:46 AM

test/Object/AArch64/nm-trivial-object-arm64_32.test is such a test. Older llvm-nm/llvm-readobj/llvm-objdump Mach-O code has some tests under test/Object but some functionality does not have tests.

This revision was landed with ongoing or failed builds.Jul 15 2021, 9:50 AM
This revision was automatically updated to reflect the committed changes.