This is an archive of the discontinued LLVM Phabricator instance.

[xray] add --symbolize-mangled cli opt for llvm-xray extract to output mangled names
ClosedPublic

Authored by johnislarry on Jan 15 2020, 1:01 PM.

Details

Summary

This adds an additional cli flag for the llvm-xray extract tool. This is useful if you're more interested in consuming the mangled symbol name, instead of the default now which is demangled.

Test Plan: ninja check-llvm

Diff Detail

Event Timeline

johnislarry created this revision.Jan 15 2020, 1:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2020, 1:01 PM

The usual "naming of things" - are there flags with similar functionality in other tools (like llvm-symbolizer) that might provide inspiration for consistent naming here (perhaps the name you've chosen already was inspired by that)?

llvm/tools/llvm-xray/xray-extract.cpp
93–95

Usually LLVM code skips {} on single statement blocks.

Thanks @dblaikie - I fixed the curly braces, and decided to go with --no-demangle, which llvm-symbolizer happens to use, and which seems more standard

dblaikie accepted this revision.Jan 15 2020, 1:58 PM

Looks good -t hanks!

This revision is now accepted and ready to land.Jan 15 2020, 1:58 PM

Thanks @dblaikie! I don't have commit access so I believe that means I can't commit this directly. I'd appreciate it if you or anyone else could do that on my behalf!

This revision was automatically updated to reflect the committed changes.