This is an archive of the discontinued LLVM Phabricator instance.

llvm-undname: Add support for demangling typeinfo names
ClosedPublic

Authored by thakis on Sep 20 2019, 11:20 AM.

Details

Summary

typeinfo names aren't symbols but string constant contents
stored in compiler-generated typeinfo objects, but llvm-cxxfilt
can demangle these for Itanium names.

In the MSVC ABI, these are just a '.' followed by a mangled
type -- this means they don't start with '?' like all MS-mangled
symbols do.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Sep 20 2019, 11:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2019, 11:20 AM
hans accepted this revision.Sep 23 2019, 1:40 AM
hans added inline comments.
llvm/include/llvm/Demangle/MicrosoftDemangle.h
161 ↗(On Diff #221076)

Off topic: Do you know why the demangler uses its own StringView class instead of StringRef like the rest of llvm?

(Looks like it comes from libcxxabi via this commit: r327859)

This revision is now accepted and ready to land.Sep 23 2019, 1:40 AM
mstorsjo added inline comments.
llvm/include/llvm/Demangle/MicrosoftDemangle.h
161 ↗(On Diff #221076)

The demangler can't use the normal llvm classes, as it is supposed to be able to run on top of plain C/C++ standard libraries (because it's shared with the demangling code in libcxxabi).

hans added inline comments.Sep 23 2019, 1:52 AM
llvm/include/llvm/Demangle/MicrosoftDemangle.h
161 ↗(On Diff #221076)

Ah, thanks for clarifying!

This revision was automatically updated to reflect the committed changes.