summaryrefslogtreecommitdiff
path: root/include/lldb/API/SBStringList.h
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-03-11 13:58:46 +0000
committerPavel Labath <pavel@labath.sk>2019-03-11 13:58:46 +0000
commita33eb2ae79e37032786de0c0d3728047a71e570d (patch)
tree06d8fc2846791471f36644ac559013cab01dc81a /include/lldb/API/SBStringList.h
parentdae6031f2a1212ddd04988867aed4740a028568e (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@355824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/lldb/API/SBStringList.h')
-rw-r--r--include/lldb/API/SBStringList.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/lldb/API/SBStringList.h b/include/lldb/API/SBStringList.h
index e10153ee3..1df1e45f9 100644
--- a/include/lldb/API/SBStringList.h
+++ b/include/lldb/API/SBStringList.h
@@ -23,6 +23,8 @@ public:
~SBStringList();
+ explicit operator bool() const;
+
bool IsValid() const;
void AppendString(const char *str);