This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Demangle location name in undefined symbol diagnostics
ClosedPublic

Authored by BertalanD on Jul 25 2022, 8:23 AM.

Details

Summary

If the -demangle flag is passed to lld, symbol names will now be
demangled in the "referenced by:" message in addition to the referenced
symbol's name, which was already demangled before this change.

Diff Detail

Event Timeline

BertalanD created this revision.Jul 25 2022, 8:23 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 25 2022, 8:23 AM
BertalanD requested review of this revision.Jul 25 2022, 8:23 AM
thakis added a subscriber: thakis.Jul 25 2022, 8:27 AM

The patch description is a bit misleading: This already happens for undef diags without debug info, and the patch to look at debug info regressed this for the with-debug-info case and this fixes that regression, right?

thakis accepted this revision.Jul 25 2022, 8:30 AM

(...but with patch description made more precise, lg and thanks!)

This revision is now accepted and ready to land.Jul 25 2022, 8:30 AM

(see also lld/test/MachO/demangle.s)

This already happens for undef diags without debug info, and the patch to look at debug info regressed this for the with-debug-info case and this fixes that regression, right?

I don't think so. Location messages weren't demangled even before my changes; only the names of the duplicate/undefined symbols were.

Ah I see, it was demangled in the "undefined symbol:" line, but not in the "referenced by:" line. Can you say that in the commit message then? (Ie clarify it only fixes the location message, not the main message, which already worked)

BertalanD retitled this revision from [lld-macho] Demangle symbol name in undefined symbol diagnostics to [lld-macho] Demangle location name in undefined symbol diagnostics.Jul 25 2022, 9:01 AM
BertalanD edited the summary of this revision. (Show Details)

New description looks great. Ship it :)

Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 9:43 AM