[PATCH] D83152: llvm-nm: add flag to suppress no symbols warning

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 00:47:34 PDT 2020


jhenderson added reviewers: smeenai, arichardson, grimar, MaskRay, rupprecht.
jhenderson added a subscriber: grimar.
jhenderson added a comment.

Added a couple more people with experience with Darwin, to see if they have any thoughts on the option name/whether it would be helpful to be identical etc. Also added @grimar/@MaskRay/@rupprecht who have a lot of experience with the binutils too.

Please update the llvm-nm documentation found in the CommandGuide directory to include the new switch as part of this change.

I'm happy to support adding the option, if there's a desire for it. It's trivial enough that it seems reasonable. I don't know about the name of it, and would prefer a shorter name if anybody can come up with one (my only suggestion is `--no-no-symbols-warning` which is almost as verbose and possibly more confusing), but if matching the libtool name is useful, I'm not actively opposed to it.



================
Comment at: llvm/test/tools/llvm-nm/X86/nm-no-symbols.test:14
+# RUN: llvm-nm -no-warning-for-no-symbols %t.o 2>&1 | FileCheck %s -DFILE=%t.o --check-prefix NO-WARNING --allow-empty
+# NO-WARNING-NOT: no symbols
----------------
If I'm right, llvm-nm should not print any output at all in this case? If that's the case, I'd change this line to: `# NO-WARNING-NOT: {{.}}` to make it a little more robust against possible further changes/typos etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83152/new/

https://reviews.llvm.org/D83152





More information about the llvm-commits mailing list