Use the itaniumDemangler in Demangle/Demangle.h to demangle symbols starting with "_Z".
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:
- 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'm happy to include both the mangled and demangled name in the YAML.
- 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.