This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Remove Expression's dependency on CPlusPlusLanguagePlugin
ClosedPublic

Authored by bulbazord on Sep 20 2021, 4:59 PM.

Details

Summary

This change accomplishes the following:

  • Moves IRExecutionUnit::FindBestAlternateMangledName to Language.
  • Renames FindBestAlternateMangledName to FindBestAlternateFunctionMangledName
  • Changes the first parameter of said method from a ConstString representing a demangled name to a Mangled.

This allows us to remove the use of CPlusPlusLanguage from Expression

Diff Detail

Event Timeline

bulbazord created this revision.Sep 20 2021, 4:59 PM
bulbazord requested review of this revision.Sep 20 2021, 4:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2021, 4:59 PM
JDevlieghere added inline comments.Sep 20 2021, 5:04 PM
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
524–530

I know you just copied this, but else after a return?

bulbazord added inline comments.Sep 20 2021, 5:06 PM
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
524–530

I think there's a lot of opportunity to refactor this method. Think I should do it in this change or would a follow-up be more reasonable?

JDevlieghere added inline comments.Sep 20 2021, 5:08 PM
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
524–530

If you're planning more changes then a follow-up sounds like the best course of action.

friendly ping! :)

I'm fine with this, but I'll defer to Jonas since he had the last significant comments.

JDevlieghere accepted this revision.Sep 28 2021, 11:32 AM

LGTM with a followup

This revision is now accepted and ready to land.Sep 28 2021, 11:32 AM