This is an archive of the discontinued LLVM Phabricator instance.

[OptRemark] Demangle symbols when emitting remarks
AbandonedPublic

Authored by thegameg on Jul 10 2018, 8:58 AM.

Details

Reviewers
anemet
hfinkel
Summary

Use the itaniumDemangler in Demangle/Demangle.h to demangle symbols starting with "_Z".

Diff Detail

Event Timeline

thegameg created this revision.Jul 10 2018, 8:58 AM

I specifically didn't want to do this for the YAML output. The tool consuming the YAML should demangle if it wants. It's hard to go backward, and so if the tool needs to map back to symbols in the program, it needs the mangled name. That having been said:

  1. I'm happy to demangle in textual output from the command-line tools (although we should probably print both the mangled and demangled name).
  2. I'm happy to include both the mangled and demangled name in the YAML.
thegameg abandoned this revision.Oct 23 2018, 7:08 AM

Thanks Hal!

  1. I'm happy to demangle in textual output from the command-line tools (although we should probably print both the mangled and demangled name).
  • I'll follow up in a new patch to demangle in the command line output but keep the mangled name in the serialized format.
  • Part of this was to match swift's behavior, but we might be better using the mangled name in swift as well.