This is an archive of the discontinued LLVM Phabricator instance.

nm: Add -no-weak flag for hiding weak symbols
ClosedPublic

Authored by keith on Jun 28 2018, 3:08 PM.

Details

Summary

This adds a new -no-weak flag to nm to hide weak symbols in its output.
This also adds a -W alias for this which is analogous to -U.

Diff Detail

Event Timeline

keith created this revision.Jun 28 2018, 3:08 PM
keith updated this revision to Diff 153540.Jun 29 2018, 10:58 AM

Use count 0 instead of FileCheck for test

keith updated this revision to Diff 153541.Jun 29 2018, 10:59 AM

Revert unnecessary FileCheck prefix

kastiglione added inline comments.Jun 29 2018, 12:02 PM
tools/llvm-nm/llvm-nm.cpp
85

This should probably be "Show only non-weak symbols" since all the rest of the descriptions are phrased affirmatively.

keith updated this revision to Diff 153551.Jun 29 2018, 12:07 PM

Update help wording

kastiglione accepted this revision.Jun 29 2018, 4:37 PM

Accepting with the following reasoning: This is consistent with the existing filtering by other symbol kinds, and is opt-in/non-breaking.

This revision is now accepted and ready to land.Jun 29 2018, 4:37 PM

Can you also document -no-weak in docs/CommandGuide/llvm-nm.rst?

keith updated this revision to Diff 153672.Jul 1 2018, 10:44 PM

Add --no-weak to command guide

This revision was automatically updated to reflect the committed changes.