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

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 11:43:46 PDT 2019


rupprecht accepted this revision.
rupprecht added inline comments.
This revision is now accepted and ready to land.


================
Comment at: tools/llvm-nm/llvm-nm.cpp:2083
+  // If both --demangle and --no-demangle are specified then pick the last one.
+  if (NoDemangle.getPosition() > Demangle.getPosition())
+    Demangle = !NoDemangle;
----------------
Can you add a test case that ensures getPosition() returns the last occurrence?
e.g. `-C --no-demangle -C` should be demangled because NoDemangle.getPosition() is 1, and Demangle.getPosition() is 2 and not 0 (or whatever indexing it uses)


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