llvm-project/lldb/scripts
Pavel Labath 7f5237bccc Add "operator bool" to SB APIs
Summary:
Our python version of the SB API has (the python equivalent of)
operator bool, but the C++ version doesn't.

This is because our python operators are added by modify-python-lldb.py,
which performs postprocessing on the swig-generated interface files.

In this patch, I add the "operator bool" to all SB classes which have an
IsValid method (which is the same logic used by modify-python-lldb.py).
This way, we make the two interfaces more constent, and it allows us to
rely on swig's automatic syntesis of python __nonzero__ methods instead
of doing manual fixups.

Reviewers: zturner, jingham, clayborg, jfb, serge-sans-paille

Subscribers: jdoerfert, lldb-commits

Differential Revision: https://reviews.llvm.org/D58792

llvm-svn: 355824
2019-03-11 13:58:46 +00:00
..
Python Add "operator bool" to SB APIs 2019-03-11 13:58:46 +00:00
Xcode [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
interface Add "operator bool" to SB APIs 2019-03-11 13:58:46 +00:00
swig_bot_lib *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
CMakeLists.txt [CMake] Python bindings generation polishing 2019-01-04 12:47:02 +00:00
analyze-project-deps.py Make scripts/analyzer-project-deps compatible with python3 2018-12-06 10:27:38 +00:00
build-lldb-llvm-clang Change build-llvm.py and build-lldb-llvm-clang's patching mechanisms to 2017-09-27 23:44:54 +00:00
buildbot.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
checkpoint-llvm.pl
disasm-gdb-remote.pl
finish-swig-wrapper-classes.sh
finishSwigWrapperClasses.py Install six.py conditionally 2017-02-04 00:20:24 +00:00
framework-header-fix.sh Update framework-header-fix to force system sed 2018-11-04 15:55:28 +00:00
generate-vers.pl
get_relative_lib_dir.py
install-lldb.sh
install_custom_python.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb.swig Add "operator bool" to SB APIs 2019-03-11 13:58:46 +00:00
macos-setup-codesign.sh Add a script to setup codesigning on macOS. 2018-06-14 18:04:13 +00:00
prepare_bindings.py Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
sed-sources
shush
sort-pbxproj.rb Change sort-pbxproj.rb to find the project.pbxproj in the 2018-07-23 23:34:50 +00:00
swig_bot.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
use_lldb_suite.py use_lldb_suite.py: Fix potential infinite loop 2019-02-07 14:03:43 +00:00
utilsArgsParse.py Install six.py conditionally 2017-02-04 00:20:24 +00:00
utilsDebug.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
utilsOsType.py The Python 3 part of the script was missed when adding OpenBSD support. 2018-10-04 20:34:58 +00:00
verify_api.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00