[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 Mar 1 00:22:06 PST 2021


jhenderson added a comment.

You need to add the `--quiet` option to the llvm-nm documentation page, which you can find at llvm/docs/CommandGuide/llvm-nm.rst.



================
Comment at: llvm/test/tools/llvm-nm/X86/nm-no-symbols.test:13
+
+# RUN: llvm-nm --quiet %t.o 2>&1 | FileCheck %s -DFILE=%t.o --check-prefix=NO-WARNING --allow-empty
+# NO-WARNING-NOT: {{.}}
----------------
I should have noticed this before. Could you replace the FileCheck line with `count 0` instead? That'll be simpler, I think.


================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:158-159
 
+cl::opt<bool> Quiet("quiet", cl::desc("Suppress 'no symbols' diagnostic"),
+                    cl::cat(NMCat));
+
----------------
I don't think these options are in any particular order, but it would probably make sense not to split up the two size-related options! I think you can just move this somewhere else.


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