[PATCH] D49043: [llvm-objdump] Add -demangle (-C) option

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 14:08:06 PDT 2018


davide requested changes to this revision.
davide added inline comments.
This revision now requires changes to proceed.


================
Comment at: test/tools/llvm-objdump/disassemble-demangle.test:1
+# RUN: llvm-objdump -d -C %p/Inputs/mangled.x86_64 | FileCheck %s
+
----------------
please use `yaml2obj` instead of checking in a binary.


================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:94-97
+cl::opt<bool> llvm::Demangle("demangle", cl::desc("Demangle symbols names"));
+static cl::alias DemangleShort("C", cl::desc("Alias for --demangle"),
+                               cl::aliasopt(Demangle));
+
----------------
This syntax breaks the GNU one.
`--demangle/-C` accepts a string, which is the `STYLE`.
I don't think it really matters a lot nowadays, but given you're going through the compatibility route, you might want to accept the style and ignore it.


Repository:
  rL LLVM

https://reviews.llvm.org/D49043





More information about the llvm-commits mailing list