[Lldb-commits] [PATCH] D142926: [lldb][RFC] Replace SB swig interfaces with API headers

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 30 12:55:16 PST 2023


bulbazord created this revision.
bulbazord added reviewers: JDevlieghere, clayborg, jingham, labath, mib.
Herald added a project: All.
bulbazord requested review of this revision.
Herald added a project: LLDB.

This is a proof-of-concept change that shows what it would take to use
the API headers as the source-of-truth for generating swig bindings instead of
using the interface files directly. It only covers SBAddress but can easily
extend to all the other SB classes.

The idea is to use the API headers as the "source of truth" when generating the
swig bindings. The swig interfaces include a bit more than the C++ API (e.g.
docstrings, python methods) but those can be conditionally included when we
invoke swig. To avoid "polluting" the headers in the LLDB framework on macOS, we
can use the unifdef utility to remove the swig bits as we copy them for staging.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142926

Files:
  lldb/bindings/interface/SBAddress.i
  lldb/bindings/interface/SBAddressDocstrings.i
  lldb/bindings/interface/SBAddressExtensions.i
  lldb/bindings/interfaces.swig
  lldb/bindings/macros.swig
  lldb/cmake/modules/LLDBFramework.cmake
  lldb/include/lldb/API/SBAddress.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142926.493386.patch
Type: text/x-patch
Size: 11917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230130/ee4bad59/attachment.bin>


More information about the lldb-commits mailing list