[PATCH] D34668: llvm-nm: Add suport for symbol demangling (-C/--demangle)

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 11:24:29 PDT 2017


davide requested changes to this revision.
davide added a comment.
This revision now requires changes to proceed.

See the comment inline. If you have an example of mangled symbols starting with `___Z`, you might consider adding a test for it.



================
Comment at: tools/llvm-nm/llvm-nm.cpp:668-669
+static Optional<std::string> demangle(StringRef Name) {
+  if ((Name.size() > 2 && Name.startswith("_Z")) ||
+      (Name.size() > 3 && Name.startswith("___Z"))) {
+    int Status;
----------------
I'm aware that Itanium mangled symbols start with `_Z` but I'm not aware of the `___Z` prefix, do you have an example?


https://reviews.llvm.org/D34668





More information about the llvm-commits mailing list