This is an archive of the discontinued LLVM Phabricator instance.

[lld][nfc] Remove lld::demangle() (partial revert of D116279)
ClosedPublic

Authored by int3 on Oct 13 2022, 11:05 PM.

Details

Summary

D116279: [lld] Add support for other demanglers other than Itanium, in addition to adding support for other demanglers, also
factored out some of the demangling logic. However, I don't think the
abstraction really carries its weight -- after D135942: [lld-macho][nfc] lld/Common's `demangle()` is redundant for Mach-O, only the ELF
and WASM backends call it with anything other than a non-constant
shouldDemangle argument. The COFF and Mach-O backends were already
doing the should-demangle check before calling demangle().

Diff Detail

Event Timeline

int3 created this revision.Oct 13 2022, 11:05 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 13 2022, 11:05 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Oct 13 2022, 11:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 11:05 PM
sbc100 added inline comments.Oct 14 2022, 11:11 AM
lld/wasm/Symbols.cpp
39

Is using std::string(name) preferable to name.str() ?

MaskRay accepted this revision.Oct 14 2022, 11:13 AM

Looks great!

This revision is now accepted and ready to land.Oct 14 2022, 11:13 AM
int3 added inline comments.Oct 14 2022, 12:07 PM
lld/wasm/Symbols.cpp
39

no idea. Most of the original code used the std::string constructor though. But... .str() is fewer characters and looks cleaner. I'll switch them over.

This revision was landed with ongoing or failed builds.Oct 14 2022, 12:29 PM
This revision was automatically updated to reflect the committed changes.