Page MenuHomePhabricator

[lldb] Group ABI plugins
ClosedPublic

Authored by labath on Thu, Feb 6, 8:48 AM.

Details

Summary

There's a fair amount of code duplication between the different ABI plugins for
the same architecture (e.g. ABIMacOSX_arm & ABISysV_arm). Deduplicating this
code is not very easy at the moment because there is no good place where to put
the common code.

Instead of creating more plugins, this patch reduces their number by grouping
similar plugins into a single folder/plugin. This makes it easy to extract
common code to a (e.g.) base class, which can then live in the same folder.

The grouping is done based on the underlying llvm target for that architecture,
because the plugins already require this for their operation.

Diff Detail

Event Timeline

labath created this revision.Thu, Feb 6, 8:48 AM
Herald added a project: Restricted Project. · View Herald Transcript
labath added a comment.Thu, Feb 6, 8:50 AM

If there's a need for single entry point for each of the new meta-plugins, this can go into a new file like ABIAArch64.cpp (and then the common code can go there too).

JDevlieghere accepted this revision.Thu, Feb 6, 9:32 AM
This revision is now accepted and ready to land.Thu, Feb 6, 9:32 AM
This revision was automatically updated to reflect the committed changes.