This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Convert builders to classes so we can use inheritance to override platform specific methods (NFC)
ClosedPublic

Authored by JDevlieghere on Aug 18 2020, 3:03 PM.

Details

Reviewers
labath
Group Reviewers
Restricted Project
Commits
rG1922bf12e1f3: [lldb] Convert builders to use inheritance (NFC)
Summary

Use inheritance and a factory method to hand out builders instead of importing the desired module. This has the advantage that the platform specific implementations can override methods as they desire.

This came up in D85539

Diff Detail

Event Timeline

JDevlieghere created this revision.Aug 18 2020, 3:03 PM
JDevlieghere requested review of this revision.Aug 18 2020, 3:03 PM
JDevlieghere retitled this revision from [lldb] Convert builders to classes so we can use inheritance to override platform specific methods to [lldb] Convert builders to classes so we can use inheritance to override platform specific methods (NFC).
JDevlieghere edited the summary of this revision. (Show Details)
labath accepted this revision.Aug 19 2020, 4:16 AM
labath added inline comments.
lldb/packages/Python/lldbsuite/builders/freebsd.py
5–11

How about we put this into the base class, and remove all the noop builders?

This revision is now accepted and ready to land.Aug 19 2020, 4:16 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2020, 8:44 AM
lldb/packages/Python/lldbsuite/test/plugins/builder_netbsd.py