llvm-project/lldb/bindings
Dave Lee 6e450d1347 [lldb] Use SWIG_fail in python-typemaps.swig (NFC)
When attempting to use SWIG's `-builtin` flag, there were a few compile
failures caused by a mismatch between return type and return value. In those
cases, the return type was `int` but many of the type maps assume returning
`NULL`/`nullptr` (only the latter caused compile failures).

This fix abstracts failure paths to use the `SWIG_fail` macro, which performs
`goto fail;`. Each of the generated functions contain a `fail` label, which
performs any resource cleanup and returns the appropriate failure value.

This change isn't strictly necessary at this point, but seems like the right
thing to do, and for anyone who tries `-builtin` later, it resolves those
issues.

Differential Revision: https://reviews.llvm.org/D133961
2022-09-16 08:25:01 -07:00
..
interface [Formatters][NFCI] Replace 'is_regex' arguments with an enum. 2022-09-13 12:50:55 -07:00
lua [lldb] (Semi-automatically) format .swig files 2021-12-16 13:58:37 +01:00
python [lldb] Use SWIG_fail in python-typemaps.swig (NFC) 2022-09-16 08:25:01 -07:00
CMakeLists.txt [lldb] Move create_relative_symlink function up in CMake hierarchy 2021-11-23 21:59:49 +01:00
headers.swig [trace][intel-pt] Create basic SB API 2021-06-17 15:14:47 -07:00
interfaces.swig [trace] Add SBTraceCursor bindings 2022-08-02 16:55:33 -07:00
macros.swig [lldb][bindings] Implement __repr__ instead of __str__ 2022-06-11 10:19:51 -07:00