[PATCH] D60134: [llvm-nm]Add support for --no-demangle

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 01:51:43 PDT 2019


grimar added a comment.

Seems llvm-nm is inconsistent.

- -no-dyldinfo can't be used with -add-dyldinfo/-dyldinfo-only
- -no-sort always overrides all other kinds of sorts.

And this patch implements the correct behavior of the normal option the first time it seems.



================
Comment at: tools/llvm-nm/llvm-nm.cpp:2085
+    Demangle = !NoDemangle;
+
   // llvm-nm only reads binary files.
----------------
I am not sure this piece of code should be right here.

It is placed before the `llvm::InitializeAll*` calls, what is a bit too far from where the other values (like `OutputFormat`)
are set. What about moving it below? For example before the `llvm::for_each(InputFilenames, dumpSymbolNamesFromFile);`.
I would expect such options that have `-no-*` flags to be grouped and together.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60134





More information about the llvm-commits mailing list