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
Paths
| Differential D86174
[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
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 TimelineJDevlieghere 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 added a child revision: D85539: [lldb] Extend builder to pass the TRIPLE spec to Make.Aug 18 2020, 4:50 PM This revision is now accepted and ready to land.Aug 19 2020, 4:16 AM Closed by commit rG1922bf12e1f3: [lldb] Convert builders to use inheritance (NFC) (authored by JDevlieghere). · Explain WhyAug 19 2020, 8:44 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 286571 lldb/packages/Python/lldbsuite/builders/__init__.py
lldb/packages/Python/lldbsuite/builders/builder.py
lldb/packages/Python/lldbsuite/builders/darwin.py
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
lldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py
lldb/packages/Python/lldbsuite/test/plugins/builder_freebsd.py
lldb/packages/Python/lldbsuite/test/plugins/builder_linux.py
lldb/packages/Python/lldbsuite/test/plugins/builder_netbsd.py
|