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
diff --git a/lldb/source/API/SBAddress.cpp b/lldb/source/API/SBAddress.cpp
index 87139ca..2353639 100644
--- a/lldb/source/API/SBAddress.cpp
+++ b/lldb/source/API/SBAddress.cpp
@@ -71,6 +71,10 @@
bool SBAddress::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBAddress, IsValid);
+ return this->operator bool();
+}
+SBAddress::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBAddress, operator bool);
return m_opaque_up != NULL && m_opaque_up->IsValid();
}
diff --git a/lldb/source/API/SBBlock.cpp b/lldb/source/API/SBBlock.cpp
index 91d000c..90a916b 100644
--- a/lldb/source/API/SBBlock.cpp
+++ b/lldb/source/API/SBBlock.cpp
@@ -48,6 +48,10 @@
bool SBBlock::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsValid);
+ return this->operator bool();
+}
+SBBlock::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, operator bool);
return m_opaque_ptr != NULL;
}
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp
index 9170b4d..14c92f2 100644
--- a/lldb/source/API/SBBreakpoint.cpp
+++ b/lldb/source/API/SBBreakpoint.cpp
@@ -92,6 +92,10 @@
bool SBBreakpoint::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, IsValid);
+ return this->operator bool();
+}
+SBBreakpoint::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpoint, operator bool);
BreakpointSP bkpt_sp = GetSP();
if (!bkpt_sp)
diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp
index 290d95d4..e91874ff 100644
--- a/lldb/source/API/SBBreakpointLocation.cpp
+++ b/lldb/source/API/SBBreakpointLocation.cpp
@@ -65,6 +65,10 @@
bool SBBreakpointLocation::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointLocation, IsValid);
+ return this->operator bool();
+}
+SBBreakpointLocation::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointLocation, operator bool);
return bool(GetSP());
}
diff --git a/lldb/source/API/SBBreakpointName.cpp b/lldb/source/API/SBBreakpointName.cpp
index cc858a0..85abfdd 100644
--- a/lldb/source/API/SBBreakpointName.cpp
+++ b/lldb/source/API/SBBreakpointName.cpp
@@ -190,6 +190,10 @@
bool SBBreakpointName::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsValid);
+ return this->operator bool();
+}
+SBBreakpointName::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, operator bool);
if (!m_impl_up)
return false;
diff --git a/lldb/source/API/SBBroadcaster.cpp b/lldb/source/API/SBBroadcaster.cpp
index 40f4ab7..ef759a8 100644
--- a/lldb/source/API/SBBroadcaster.cpp
+++ b/lldb/source/API/SBBroadcaster.cpp
@@ -139,6 +139,10 @@
bool SBBroadcaster::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBroadcaster, IsValid);
+ return this->operator bool();
+}
+SBBroadcaster::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBroadcaster, operator bool);
return m_opaque_ptr != NULL;
}
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 83f77c4..cb014a9 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -201,6 +201,10 @@
bool SBCommandInterpreter::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreter, IsValid);
+ return this->operator bool();
+}
+SBCommandInterpreter::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreter, operator bool);
return m_opaque_ptr != nullptr;
}
@@ -685,6 +689,10 @@
bool SBCommand::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBCommand, IsValid);
+ return this->operator bool();
+}
+SBCommand::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommand, operator bool);
return m_opaque_sp.get() != nullptr;
}
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index d28275c..04c6e53 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -60,6 +60,10 @@
bool SBCommandReturnObject::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandReturnObject, IsValid);
+ return this->operator bool();
+}
+SBCommandReturnObject::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandReturnObject, operator bool);
return m_opaque_up != nullptr;
}
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index 5ca63c4..6c2efa5 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -34,6 +34,10 @@
bool SBCommunication::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommunication, IsValid);
+ return this->operator bool();
+}
+SBCommunication::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommunication, operator bool);
return m_opaque != NULL;
}
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index b3b705f..2372e0e5 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -188,6 +188,10 @@
bool SBCompileUnit::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCompileUnit, IsValid);
+ return this->operator bool();
+}
+SBCompileUnit::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCompileUnit, operator bool);
return m_opaque_ptr != NULL;
}
diff --git a/lldb/source/API/SBData.cpp b/lldb/source/API/SBData.cpp
index 845dfa6..799950c 100644
--- a/lldb/source/API/SBData.cpp
+++ b/lldb/source/API/SBData.cpp
@@ -59,6 +59,10 @@
bool SBData::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBData, IsValid);
+ return this->operator bool();
+}
+SBData::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBData, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index fc39064..693b0fe 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -294,6 +294,10 @@
bool SBDebugger::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDebugger, IsValid);
+ return this->operator bool();
+}
+SBDebugger::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDebugger, operator bool);
return m_opaque_sp.get() != nullptr;
}
diff --git a/lldb/source/API/SBDeclaration.cpp b/lldb/source/API/SBDeclaration.cpp
index 9283ebe..c04331a 100644
--- a/lldb/source/API/SBDeclaration.cpp
+++ b/lldb/source/API/SBDeclaration.cpp
@@ -54,6 +54,10 @@
bool SBDeclaration::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDeclaration, IsValid);
+ return this->operator bool();
+}
+SBDeclaration::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBDeclaration, operator bool);
return m_opaque_up.get() && m_opaque_up->IsValid();
}
diff --git a/lldb/source/API/SBError.cpp b/lldb/source/API/SBError.cpp
index 6443fd4..b7866f5 100644
--- a/lldb/source/API/SBError.cpp
+++ b/lldb/source/API/SBError.cpp
@@ -139,6 +139,10 @@
bool SBError::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, IsValid);
+ return this->operator bool();
+}
+SBError::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, operator bool);
return m_opaque_up != NULL;
}
diff --git a/lldb/source/API/SBEvent.cpp b/lldb/source/API/SBEvent.cpp
index 5cc131e..9cb2ab4 100644
--- a/lldb/source/API/SBEvent.cpp
+++ b/lldb/source/API/SBEvent.cpp
@@ -161,6 +161,10 @@
bool SBEvent::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBEvent, IsValid);
+ return this->operator bool();
+}
+SBEvent::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBEvent, operator bool);
// Do NOT use m_opaque_ptr directly!!! Must use the SBEvent::get() accessor.
// See comments in SBEvent::get()....
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp
index ee28c2f..048d5ed 100644
--- a/lldb/source/API/SBFileSpec.cpp
+++ b/lldb/source/API/SBFileSpec.cpp
@@ -64,6 +64,10 @@
bool SBFileSpec::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFileSpec, IsValid);
+ return this->operator bool();
+}
+SBFileSpec::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFileSpec, operator bool);
return m_opaque_up->operator bool();
}
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index 24bea7a..bfa4621 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -91,6 +91,10 @@
bool SBFrame::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsValid);
+ return this->operator bool();
+}
+SBFrame::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, operator bool);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index 2732775..595f283 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -46,6 +46,10 @@
bool SBFunction::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFunction, IsValid);
+ return this->operator bool();
+}
+SBFunction::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFunction, operator bool);
return m_opaque_ptr != NULL;
}
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp
index 53b2d19..f73dcc4 100644
--- a/lldb/source/API/SBInstruction.cpp
+++ b/lldb/source/API/SBInstruction.cpp
@@ -94,6 +94,10 @@
bool SBInstruction::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBInstruction, IsValid);
+ return this->operator bool();
+}
+SBInstruction::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBInstruction, operator bool);
return m_opaque_sp && m_opaque_sp->IsValid();
}
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index bc6f74c..9a76fe5 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -44,6 +44,10 @@
bool SBInstructionList::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBInstructionList, IsValid);
+ return this->operator bool();
+}
+SBInstructionList::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBInstructionList, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index e0c0a5c..c11780f 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -74,6 +74,10 @@
bool SBLineEntry::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBLineEntry, IsValid);
+ return this->operator bool();
+}
+SBLineEntry::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBLineEntry, operator bool);
return m_opaque_up.get() && m_opaque_up->IsValid();
}
diff --git a/lldb/source/API/SBListener.cpp b/lldb/source/API/SBListener.cpp
index 45ae6fd..3107924 100644
--- a/lldb/source/API/SBListener.cpp
+++ b/lldb/source/API/SBListener.cpp
@@ -52,6 +52,10 @@
bool SBListener::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBListener, IsValid);
+ return this->operator bool();
+}
+SBListener::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBListener, operator bool);
return m_opaque_sp != nullptr;
}
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 2c2670e..e478304 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -80,6 +80,10 @@
bool SBModule::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModule, IsValid);
+ return this->operator bool();
+}
+SBModule::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModule, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBModuleSpec.cpp b/lldb/source/API/SBModuleSpec.cpp
index 918b17f..6d98479 100644
--- a/lldb/source/API/SBModuleSpec.cpp
+++ b/lldb/source/API/SBModuleSpec.cpp
@@ -42,6 +42,10 @@
bool SBModuleSpec::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModuleSpec, IsValid);
+ return this->operator bool();
+}
+SBModuleSpec::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBModuleSpec, operator bool);
return m_opaque_up->operator bool();
}
diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp
index 8031e8d..e6c073c 100644
--- a/lldb/source/API/SBPlatform.cpp
+++ b/lldb/source/API/SBPlatform.cpp
@@ -287,6 +287,10 @@
bool SBPlatform::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBPlatform, IsValid);
+ return this->operator bool();
+}
+SBPlatform::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBPlatform, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 1d96391..6aed881 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -119,6 +119,10 @@
bool SBProcess::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBProcess, IsValid);
+ return this->operator bool();
+}
+SBProcess::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBProcess, operator bool);
ProcessSP process_sp(m_opaque_wp.lock());
return ((bool)process_sp && process_sp->IsValid());
diff --git a/lldb/source/API/SBProcessInfo.cpp b/lldb/source/API/SBProcessInfo.cpp
index fbf9cae..044ff6b 100644
--- a/lldb/source/API/SBProcessInfo.cpp
+++ b/lldb/source/API/SBProcessInfo.cpp
@@ -50,6 +50,10 @@
bool SBProcessInfo::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBProcessInfo, IsValid);
+ return this->operator bool();
+}
+SBProcessInfo::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBProcessInfo, operator bool);
return m_opaque_up != nullptr;
}
diff --git a/lldb/source/API/SBQueue.cpp b/lldb/source/API/SBQueue.cpp
index 03abb80..12a6ada 100644
--- a/lldb/source/API/SBQueue.cpp
+++ b/lldb/source/API/SBQueue.cpp
@@ -247,6 +247,10 @@
bool SBQueue::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, IsValid);
+ return this->operator bool();
+}
+SBQueue::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, operator bool);
return m_opaque_sp->IsValid();
}
diff --git a/lldb/source/API/SBQueueItem.cpp b/lldb/source/API/SBQueueItem.cpp
index f0aa959..6755505 100644
--- a/lldb/source/API/SBQueueItem.cpp
+++ b/lldb/source/API/SBQueueItem.cpp
@@ -40,6 +40,10 @@
bool SBQueueItem::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueueItem, IsValid);
+ return this->operator bool();
+}
+SBQueueItem::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueueItem, operator bool);
return m_queue_item_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBReproducer.cpp b/lldb/source/API/SBReproducer.cpp
index 7980f150..c3dad77 100644
--- a/lldb/source/API/SBReproducer.cpp
+++ b/lldb/source/API/SBReproducer.cpp
@@ -62,6 +62,7 @@
LLDB_REGISTER_METHOD(const lldb::SBAddress &,
SBAddress, operator=,(const lldb::SBAddress &));
LLDB_REGISTER_METHOD_CONST(bool, SBAddress, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBAddress, operator bool, ());
LLDB_REGISTER_METHOD(void, SBAddress, Clear, ());
LLDB_REGISTER_METHOD(void, SBAddress, SetAddress,
(lldb::SBSection, lldb::addr_t));
@@ -129,6 +130,7 @@
LLDB_REGISTER_METHOD(const lldb::SBBlock &,
SBBlock, operator=,(const lldb::SBBlock &));
LLDB_REGISTER_METHOD_CONST(bool, SBBlock, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBBlock, operator bool, ());
LLDB_REGISTER_METHOD_CONST(bool, SBBlock, IsInlined, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBBlock, GetInlinedName, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBBlock,
@@ -165,6 +167,7 @@
SBBreakpoint, operator!=,(const lldb::SBBreakpoint &));
LLDB_REGISTER_METHOD_CONST(lldb::break_id_t, SBBreakpoint, GetID, ());
LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBBreakpoint, operator bool, ());
LLDB_REGISTER_METHOD(void, SBBreakpoint, ClearAllBreakpointSites, ());
LLDB_REGISTER_METHOD(lldb::SBBreakpointLocation, SBBreakpoint,
FindLocationByAddress, (lldb::addr_t));
@@ -254,6 +257,7 @@
const lldb::SBBreakpointLocation &,
SBBreakpointLocation, operator=,(const lldb::SBBreakpointLocation &));
LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointLocation, operator bool, ());
LLDB_REGISTER_METHOD(lldb::SBAddress, SBBreakpointLocation, GetAddress, ());
LLDB_REGISTER_METHOD(lldb::addr_t, SBBreakpointLocation, GetLoadAddress,
());
@@ -314,6 +318,7 @@
LLDB_REGISTER_METHOD(
bool, SBBreakpointName, operator!=,(const lldb::SBBreakpointName &));
LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, operator bool, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBBreakpointName, GetName, ());
LLDB_REGISTER_METHOD(void, SBBreakpointName, SetEnabled, (bool));
LLDB_REGISTER_METHOD(bool, SBBreakpointName, IsEnabled, ());
@@ -376,6 +381,7 @@
LLDB_REGISTER_METHOD(bool, SBBroadcaster, RemoveListener,
(const lldb::SBListener &, uint32_t));
LLDB_REGISTER_METHOD_CONST(bool, SBBroadcaster, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBBroadcaster, operator bool, ());
LLDB_REGISTER_METHOD(void, SBBroadcaster, Clear, ());
LLDB_REGISTER_METHOD_CONST(
bool, SBBroadcaster, operator==,(const lldb::SBBroadcaster &));
@@ -422,6 +428,7 @@
const lldb::SBCommandInterpreter &,
SBCommandInterpreter, operator=,(const lldb::SBCommandInterpreter &));
LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreter, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, CommandExists,
(const char *));
LLDB_REGISTER_METHOD(bool, SBCommandInterpreter, AliasExists,
@@ -498,6 +505,7 @@
const char *, const char *));
LLDB_REGISTER_CONSTRUCTOR(SBCommand, ());
LLDB_REGISTER_METHOD(bool, SBCommand, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBCommand, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBCommand, GetName, ());
LLDB_REGISTER_METHOD(const char *, SBCommand, GetHelp, ());
LLDB_REGISTER_METHOD(const char *, SBCommand, GetHelpLong, ());
@@ -526,6 +534,7 @@
const lldb::SBCommandReturnObject &,
SBCommandReturnObject, operator=,(const lldb::SBCommandReturnObject &));
LLDB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetOutput, ());
LLDB_REGISTER_METHOD(const char *, SBCommandReturnObject, GetError, ());
LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, GetOutputSize, ());
@@ -566,6 +575,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBCommunication, ());
LLDB_REGISTER_CONSTRUCTOR(SBCommunication, (const char *));
LLDB_REGISTER_METHOD_CONST(bool, SBCommunication, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBCommunication, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBCommunication, GetCloseOnEOF, ());
LLDB_REGISTER_METHOD(void, SBCommunication, SetCloseOnEOF, (bool));
LLDB_REGISTER_METHOD(lldb::ConnectionStatus, SBCommunication, Connect,
@@ -606,6 +616,7 @@
(uint32_t, const lldb::SBFileSpec &, bool));
LLDB_REGISTER_METHOD(lldb::LanguageType, SBCompileUnit, GetLanguage, ());
LLDB_REGISTER_METHOD_CONST(bool, SBCompileUnit, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBCompileUnit, operator bool, ());
LLDB_REGISTER_METHOD_CONST(
bool, SBCompileUnit, operator==,(const lldb::SBCompileUnit &));
LLDB_REGISTER_METHOD_CONST(
@@ -619,6 +630,7 @@
LLDB_REGISTER_METHOD(const lldb::SBData &,
SBData, operator=,(const lldb::SBData &));
LLDB_REGISTER_METHOD(bool, SBData, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBData, operator bool, ());
LLDB_REGISTER_METHOD(uint8_t, SBData, GetAddressByteSize, ());
LLDB_REGISTER_METHOD(void, SBData, SetAddressByteSize, (uint8_t));
LLDB_REGISTER_METHOD(void, SBData, Clear, ());
@@ -699,6 +711,7 @@
(lldb::SBDebugger &));
LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, MemoryPressureDetected, ());
LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, operator bool, ());
LLDB_REGISTER_METHOD(void, SBDebugger, SetAsync, (bool));
LLDB_REGISTER_METHOD(bool, SBDebugger, GetAsync, ());
LLDB_REGISTER_METHOD(void, SBDebugger, SkipLLDBInitFiles, (bool));
@@ -836,6 +849,7 @@
const lldb::SBDeclaration &,
SBDeclaration, operator=,(const lldb::SBDeclaration &));
LLDB_REGISTER_METHOD_CONST(bool, SBDeclaration, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBDeclaration, operator bool, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBDeclaration, GetFileSpec,
());
LLDB_REGISTER_METHOD_CONST(uint32_t, SBDeclaration, GetLine, ());
@@ -866,6 +880,7 @@
LLDB_REGISTER_METHOD(void, SBError, SetErrorToGenericError, ());
LLDB_REGISTER_METHOD(void, SBError, SetErrorString, (const char *));
LLDB_REGISTER_METHOD_CONST(bool, SBError, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBError, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBError, GetDescription, (lldb::SBStream &));
}
{
@@ -887,6 +902,7 @@
(const lldb::SBBroadcaster &));
LLDB_REGISTER_METHOD(void, SBEvent, Clear, ());
LLDB_REGISTER_METHOD_CONST(bool, SBEvent, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBEvent, operator bool, ());
LLDB_REGISTER_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent,
(const lldb::SBEvent &));
LLDB_REGISTER_METHOD(bool, SBEvent, GetDescription, (lldb::SBStream &));
@@ -977,6 +993,7 @@
LLDB_REGISTER_METHOD(const lldb::SBFileSpec &,
SBFileSpec, operator=,(const lldb::SBFileSpec &));
LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, operator bool, ());
LLDB_REGISTER_METHOD_CONST(bool, SBFileSpec, Exists, ());
LLDB_REGISTER_METHOD(bool, SBFileSpec, ResolveExecutableLocation, ());
LLDB_REGISTER_STATIC_METHOD(int, SBFileSpec, ResolvePath,
@@ -1016,6 +1033,7 @@
LLDB_REGISTER_METHOD(const lldb::SBFrame &,
SBFrame, operator=,(const lldb::SBFrame &));
LLDB_REGISTER_METHOD_CONST(bool, SBFrame, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBFrame, operator bool, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext,
(uint32_t));
LLDB_REGISTER_METHOD_CONST(lldb::SBModule, SBFrame, GetModule, ());
@@ -1085,6 +1103,7 @@
LLDB_REGISTER_METHOD(const lldb::SBFunction &,
SBFunction, operator=,(const lldb::SBFunction &));
LLDB_REGISTER_METHOD_CONST(bool, SBFunction, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBFunction, operator bool, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBFunction, GetName, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBFunction, GetDisplayName, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBFunction, GetMangledName, ());
@@ -1124,6 +1143,7 @@
const lldb::SBInstruction &,
SBInstruction, operator=,(const lldb::SBInstruction &));
LLDB_REGISTER_METHOD(bool, SBInstruction, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBInstruction, operator bool, ());
LLDB_REGISTER_METHOD(lldb::SBAddress, SBInstruction, GetAddress, ());
LLDB_REGISTER_METHOD(const char *, SBInstruction, GetMnemonic,
(lldb::SBTarget));
@@ -1154,6 +1174,7 @@
const lldb::SBInstructionList &,
SBInstructionList, operator=,(const lldb::SBInstructionList &));
LLDB_REGISTER_METHOD_CONST(bool, SBInstructionList, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBInstructionList, operator bool, ());
LLDB_REGISTER_METHOD(size_t, SBInstructionList, GetSize, ());
LLDB_REGISTER_METHOD(lldb::SBInstruction, SBInstructionList,
GetInstructionAtIndex, (uint32_t));
@@ -1238,6 +1259,7 @@
());
LLDB_REGISTER_METHOD_CONST(lldb::SBAddress, SBLineEntry, GetEndAddress, ());
LLDB_REGISTER_METHOD_CONST(bool, SBLineEntry, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBLineEntry, operator bool, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBLineEntry, GetFileSpec, ());
LLDB_REGISTER_METHOD_CONST(uint32_t, SBLineEntry, GetLine, ());
LLDB_REGISTER_METHOD_CONST(uint32_t, SBLineEntry, GetColumn, ());
@@ -1257,6 +1279,7 @@
LLDB_REGISTER_METHOD(const lldb::SBListener &,
SBListener, operator=,(const lldb::SBListener &));
LLDB_REGISTER_METHOD_CONST(bool, SBListener, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBListener, operator bool, ());
LLDB_REGISTER_METHOD(void, SBListener, AddEvent, (const lldb::SBEvent &));
LLDB_REGISTER_METHOD(void, SBListener, Clear, ());
LLDB_REGISTER_METHOD(uint32_t, SBListener, StartListeningForEventClass,
@@ -1339,6 +1362,7 @@
LLDB_REGISTER_METHOD(const lldb::SBModule &,
SBModule, operator=,(const lldb::SBModule &));
LLDB_REGISTER_METHOD_CONST(bool, SBModule, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBModule, operator bool, ());
LLDB_REGISTER_METHOD(void, SBModule, Clear, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetFileSpec, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBFileSpec, SBModule, GetPlatformFileSpec,
@@ -1407,6 +1431,7 @@
LLDB_REGISTER_METHOD(const lldb::SBModuleSpec &,
SBModuleSpec, operator=,(const lldb::SBModuleSpec &));
LLDB_REGISTER_METHOD_CONST(bool, SBModuleSpec, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBModuleSpec, operator bool, ());
LLDB_REGISTER_METHOD(void, SBModuleSpec, Clear, ());
LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBModuleSpec, GetFileSpec, ());
LLDB_REGISTER_METHOD(void, SBModuleSpec, SetFileSpec,
@@ -1487,6 +1512,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBPlatform, ());
LLDB_REGISTER_CONSTRUCTOR(SBPlatform, (const char *));
LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, operator bool, ());
LLDB_REGISTER_METHOD(void, SBPlatform, Clear, ());
LLDB_REGISTER_METHOD(const char *, SBPlatform, GetName, ());
LLDB_REGISTER_METHOD(const char *, SBPlatform, GetWorkingDirectory, ());
@@ -1534,6 +1560,7 @@
LLDB_REGISTER_METHOD(const char *, SBProcess, GetShortPluginName, ());
LLDB_REGISTER_METHOD(void, SBProcess, Clear, ());
LLDB_REGISTER_METHOD_CONST(bool, SBProcess, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBProcess, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBProcess, RemoteLaunch,
(const char **, const char **, const char *,
const char *, const char *, const char *, uint32_t,
@@ -1654,6 +1681,7 @@
lldb::SBProcessInfo &,
SBProcessInfo, operator=,(const lldb::SBProcessInfo &));
LLDB_REGISTER_METHOD_CONST(bool, SBProcessInfo, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBProcessInfo, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBProcessInfo, GetName, ());
LLDB_REGISTER_METHOD(lldb::SBFileSpec, SBProcessInfo, GetExecutableFile,
());
@@ -1675,6 +1703,7 @@
LLDB_REGISTER_METHOD(const lldb::SBQueue &,
SBQueue, operator=,(const lldb::SBQueue &));
LLDB_REGISTER_METHOD_CONST(bool, SBQueue, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBQueue, operator bool, ());
LLDB_REGISTER_METHOD(void, SBQueue, Clear, ());
LLDB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBQueue, GetQueueID, ());
LLDB_REGISTER_METHOD_CONST(uint32_t, SBQueue, GetIndexID, ());
@@ -1692,6 +1721,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBQueueItem, ());
LLDB_REGISTER_CONSTRUCTOR(SBQueueItem, (const lldb::QueueItemSP &));
LLDB_REGISTER_METHOD_CONST(bool, SBQueueItem, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBQueueItem, operator bool, ());
LLDB_REGISTER_METHOD(void, SBQueueItem, Clear, ());
LLDB_REGISTER_METHOD(void, SBQueueItem, SetQueueItem,
(const lldb::QueueItemSP &));
@@ -1708,6 +1738,7 @@
LLDB_REGISTER_METHOD(const lldb::SBSection &,
SBSection, operator=,(const lldb::SBSection &));
LLDB_REGISTER_METHOD_CONST(bool, SBSection, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBSection, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBSection, GetName, ());
LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, GetParent, ());
LLDB_REGISTER_METHOD(lldb::SBSection, SBSection, FindSubSection,
@@ -1750,6 +1781,7 @@
{
LLDB_REGISTER_CONSTRUCTOR(SBStream, ());
LLDB_REGISTER_METHOD_CONST(bool, SBStream, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBStream, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBStream, GetData, ());
LLDB_REGISTER_METHOD(size_t, SBStream, GetSize, ());
LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (const char *, bool));
@@ -1763,6 +1795,7 @@
LLDB_REGISTER_METHOD(const lldb::SBStringList &,
SBStringList, operator=,(const lldb::SBStringList &));
LLDB_REGISTER_METHOD_CONST(bool, SBStringList, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBStringList, operator bool, ());
LLDB_REGISTER_METHOD(void, SBStringList, AppendString, (const char *));
LLDB_REGISTER_METHOD(void, SBStringList, AppendList, (const char **, int));
LLDB_REGISTER_METHOD(void, SBStringList, AppendList,
@@ -1787,6 +1820,7 @@
LLDB_REGISTER_METHOD(lldb::SBError, SBStructuredData, SetFromJSON,
(lldb::SBStream &));
LLDB_REGISTER_METHOD_CONST(bool, SBStructuredData, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBStructuredData, operator bool, ());
LLDB_REGISTER_METHOD(void, SBStructuredData, Clear, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBError, SBStructuredData, GetAsJSON,
(lldb::SBStream &));
@@ -1815,6 +1849,7 @@
LLDB_REGISTER_METHOD(const lldb::SBSymbol &,
SBSymbol, operator=,(const lldb::SBSymbol &));
LLDB_REGISTER_METHOD_CONST(bool, SBSymbol, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBSymbol, operator bool, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetName, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetDisplayName, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBSymbol, GetMangledName, ());
@@ -1843,6 +1878,7 @@
const lldb::SBSymbolContext &,
SBSymbolContext, operator=,(const lldb::SBSymbolContext &));
LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContext, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContext, operator bool, ());
LLDB_REGISTER_METHOD(lldb::SBModule, SBSymbolContext, GetModule, ());
LLDB_REGISTER_METHOD(lldb::SBCompileUnit, SBSymbolContext, GetCompileUnit,
());
@@ -1881,6 +1917,7 @@
LLDB_REGISTER_METHOD(void, SBSymbolContextList, Append,
(lldb::SBSymbolContextList &));
LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContextList, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBSymbolContextList, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBSymbolContextList, GetDescription,
(lldb::SBStream &));
}
@@ -1902,6 +1939,7 @@
LLDB_REGISTER_STATIC_METHOD(const char *, SBTarget, GetBroadcasterClassName,
());
LLDB_REGISTER_METHOD_CONST(bool, SBTarget, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTarget, operator bool, ());
LLDB_REGISTER_METHOD(lldb::SBProcess, SBTarget, GetProcess, ());
LLDB_REGISTER_METHOD(lldb::SBPlatform, SBTarget, GetPlatform, ());
LLDB_REGISTER_METHOD_CONST(lldb::SBDebugger, SBTarget, GetDebugger, ());
@@ -2132,6 +2170,7 @@
SBThread, operator=,(const lldb::SBThread &));
LLDB_REGISTER_METHOD_CONST(lldb::SBQueue, SBThread, GetQueue, ());
LLDB_REGISTER_METHOD_CONST(bool, SBThread, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBThread, operator bool, ());
LLDB_REGISTER_METHOD(void, SBThread, Clear, ());
LLDB_REGISTER_METHOD(lldb::StopReason, SBThread, GetStopReason, ());
LLDB_REGISTER_METHOD(size_t, SBThread, GetStopReasonDataCount, ());
@@ -2229,6 +2268,7 @@
const lldb::SBThreadCollection &,
SBThreadCollection, operator=,(const lldb::SBThreadCollection &));
LLDB_REGISTER_METHOD_CONST(bool, SBThreadCollection, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBThreadCollection, operator bool, ());
LLDB_REGISTER_METHOD(size_t, SBThreadCollection, GetSize, ());
LLDB_REGISTER_METHOD(lldb::SBThread, SBThreadCollection, GetThreadAtIndex,
(size_t));
@@ -2242,6 +2282,7 @@
SBThreadPlan, operator=,(const lldb::SBThreadPlan &));
LLDB_REGISTER_METHOD(lldb_private::ThreadPlan *, SBThreadPlan, get, ());
LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, operator bool, ());
LLDB_REGISTER_METHOD(void, SBThreadPlan, Clear, ());
LLDB_REGISTER_METHOD(lldb::StopReason, SBThreadPlan, GetStopReason, ());
LLDB_REGISTER_METHOD(size_t, SBThreadPlan, GetStopReasonDataCount, ());
@@ -2290,6 +2331,7 @@
LLDB_REGISTER_METHOD(lldb::user_id_t, SBTrace, GetTraceUID, ());
LLDB_REGISTER_CONSTRUCTOR(SBTrace, ());
LLDB_REGISTER_METHOD(bool, SBTrace, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTrace, operator bool, ());
}
{
LLDB_REGISTER_CONSTRUCTOR(SBTraceOptions, ());
@@ -2307,6 +2349,7 @@
LLDB_REGISTER_METHOD(void, SBTraceOptions, setMetaDataBufferSize,
(uint64_t));
LLDB_REGISTER_METHOD(bool, SBTraceOptions, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTraceOptions, operator bool, ());
LLDB_REGISTER_METHOD(void, SBTraceOptions, setThreadID, (lldb::tid_t));
LLDB_REGISTER_METHOD(lldb::tid_t, SBTraceOptions, getThreadID, ());
}
@@ -2318,6 +2361,7 @@
LLDB_REGISTER_METHOD(lldb::SBType &,
SBType, operator=,(const lldb::SBType &));
LLDB_REGISTER_METHOD_CONST(bool, SBType, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBType, operator bool, ());
LLDB_REGISTER_METHOD(uint64_t, SBType, GetByteSize, ());
LLDB_REGISTER_METHOD(bool, SBType, IsPointerType, ());
LLDB_REGISTER_METHOD(bool, SBType, IsArrayType, ());
@@ -2371,6 +2415,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeList, ());
LLDB_REGISTER_CONSTRUCTOR(SBTypeList, (const lldb::SBTypeList &));
LLDB_REGISTER_METHOD(bool, SBTypeList, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeList, operator bool, ());
LLDB_REGISTER_METHOD(lldb::SBTypeList &,
SBTypeList, operator=,(const lldb::SBTypeList &));
LLDB_REGISTER_METHOD(void, SBTypeList, Append, (lldb::SBType));
@@ -2381,6 +2426,7 @@
LLDB_REGISTER_METHOD(lldb::SBTypeMember &,
SBTypeMember, operator=,(const lldb::SBTypeMember &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeMember, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeMember, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBTypeMember, GetName, ());
LLDB_REGISTER_METHOD(lldb::SBType, SBTypeMember, GetType, ());
LLDB_REGISTER_METHOD(uint64_t, SBTypeMember, GetOffsetInBytes, ());
@@ -2396,6 +2442,7 @@
lldb::SBTypeMemberFunction &,
SBTypeMemberFunction, operator=,(const lldb::SBTypeMemberFunction &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeMemberFunction, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeMemberFunction, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetName, ());
LLDB_REGISTER_METHOD(const char *, SBTypeMemberFunction, GetDemangledName,
());
@@ -2416,6 +2463,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeCategory, ());
LLDB_REGISTER_CONSTRUCTOR(SBTypeCategory, (const lldb::SBTypeCategory &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeCategory, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeCategory, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBTypeCategory, GetEnabled, ());
LLDB_REGISTER_METHOD(void, SBTypeCategory, SetEnabled, (bool));
LLDB_REGISTER_METHOD(const char *, SBTypeCategory, GetName, ());
@@ -2488,6 +2536,7 @@
lldb::SBTypeEnumMember &,
SBTypeEnumMember, operator=,(const lldb::SBTypeEnumMember &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeEnumMember, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeEnumMember, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBTypeEnumMember, GetName, ());
LLDB_REGISTER_METHOD(int64_t, SBTypeEnumMember, GetValueAsSigned, ());
LLDB_REGISTER_METHOD(uint64_t, SBTypeEnumMember, GetValueAsUnsigned, ());
@@ -2496,6 +2545,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeEnumMemberList,
(const lldb::SBTypeEnumMemberList &));
LLDB_REGISTER_METHOD(bool, SBTypeEnumMemberList, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeEnumMemberList, operator bool, ());
LLDB_REGISTER_METHOD(
lldb::SBTypeEnumMemberList &,
SBTypeEnumMemberList, operator=,(const lldb::SBTypeEnumMemberList &));
@@ -2512,6 +2562,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeFilter, (uint32_t));
LLDB_REGISTER_CONSTRUCTOR(SBTypeFilter, (const lldb::SBTypeFilter &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeFilter, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeFilter, operator bool, ());
LLDB_REGISTER_METHOD(uint32_t, SBTypeFilter, GetOptions, ());
LLDB_REGISTER_METHOD(void, SBTypeFilter, SetOptions, (uint32_t));
LLDB_REGISTER_METHOD(bool, SBTypeFilter, GetDescription,
@@ -2537,6 +2588,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeFormat, (const char *, uint32_t));
LLDB_REGISTER_CONSTRUCTOR(SBTypeFormat, (const lldb::SBTypeFormat &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeFormat, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeFormat, operator bool, ());
LLDB_REGISTER_METHOD(lldb::Format, SBTypeFormat, GetFormat, ());
LLDB_REGISTER_METHOD(const char *, SBTypeFormat, GetTypeName, ());
LLDB_REGISTER_METHOD(uint32_t, SBTypeFormat, GetOptions, ());
@@ -2558,6 +2610,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeNameSpecifier,
(const lldb::SBTypeNameSpecifier &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeNameSpecifier, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeNameSpecifier, operator bool, ());
LLDB_REGISTER_METHOD(const char *, SBTypeNameSpecifier, GetName, ());
LLDB_REGISTER_METHOD(lldb::SBType, SBTypeNameSpecifier, GetType, ());
LLDB_REGISTER_METHOD(bool, SBTypeNameSpecifier, IsRegex, ());
@@ -2578,6 +2631,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBTypeSummaryOptions,
(const lldb::SBTypeSummaryOptions &));
LLDB_REGISTER_METHOD(bool, SBTypeSummaryOptions, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeSummaryOptions, operator bool, ());
LLDB_REGISTER_METHOD(lldb::LanguageType, SBTypeSummaryOptions, GetLanguage,
());
LLDB_REGISTER_METHOD(lldb::TypeSummaryCapping, SBTypeSummaryOptions,
@@ -2599,6 +2653,7 @@
CreateWithScriptCode, (const char *, uint32_t));
LLDB_REGISTER_CONSTRUCTOR(SBTypeSummary, (const lldb::SBTypeSummary &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeSummary, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeSummary, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsFunctionCode, ());
LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsFunctionName, ());
LLDB_REGISTER_METHOD(bool, SBTypeSummary, IsSummaryString, ());
@@ -2630,6 +2685,7 @@
CreateWithScriptCode, (const char *, uint32_t));
LLDB_REGISTER_CONSTRUCTOR(SBTypeSynthetic, (const lldb::SBTypeSynthetic &));
LLDB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBTypeSynthetic, operator bool, ());
LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassCode, ());
LLDB_REGISTER_METHOD(bool, SBTypeSynthetic, IsClassName, ());
LLDB_REGISTER_METHOD(const char *, SBTypeSynthetic, GetData, ());
@@ -2658,6 +2714,7 @@
SBUnixSignals, operator=,(const lldb::SBUnixSignals &));
LLDB_REGISTER_METHOD(void, SBUnixSignals, Clear, ());
LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBUnixSignals, operator bool, ());
LLDB_REGISTER_METHOD_CONST(const char *, SBUnixSignals, GetSignalAsCString,
(int32_t));
LLDB_REGISTER_METHOD_CONST(int32_t, SBUnixSignals, GetSignalNumberFromName,
@@ -2681,6 +2738,7 @@
LLDB_REGISTER_METHOD(lldb::SBValue &,
SBValue, operator=,(const lldb::SBValue &));
LLDB_REGISTER_METHOD(bool, SBValue, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBValue, operator bool, ());
LLDB_REGISTER_METHOD(void, SBValue, Clear, ());
LLDB_REGISTER_METHOD(lldb::SBError, SBValue, GetError, ());
LLDB_REGISTER_METHOD(lldb::user_id_t, SBValue, GetID, ());
@@ -2798,6 +2856,7 @@
LLDB_REGISTER_CONSTRUCTOR(SBValueList, ());
LLDB_REGISTER_CONSTRUCTOR(SBValueList, (const lldb::SBValueList &));
LLDB_REGISTER_METHOD_CONST(bool, SBValueList, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBValueList, operator bool, ());
LLDB_REGISTER_METHOD(void, SBValueList, Clear, ());
LLDB_REGISTER_METHOD(const lldb::SBValueList &,
SBValueList, operator=,(const lldb::SBValueList &));
@@ -2820,6 +2879,7 @@
lldb::SBVariablesOptions &,
SBVariablesOptions, operator=,(const lldb::SBVariablesOptions &));
LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, operator bool, ());
LLDB_REGISTER_METHOD_CONST(bool, SBVariablesOptions, GetIncludeArguments,
());
LLDB_REGISTER_METHOD(void, SBVariablesOptions, SetIncludeArguments, (bool));
@@ -2851,6 +2911,7 @@
SBWatchpoint, operator=,(const lldb::SBWatchpoint &));
LLDB_REGISTER_METHOD(lldb::watch_id_t, SBWatchpoint, GetID, ());
LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, IsValid, ());
+ LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, operator bool, ());
LLDB_REGISTER_METHOD(lldb::SBError, SBWatchpoint, GetError, ());
LLDB_REGISTER_METHOD(int32_t, SBWatchpoint, GetHardwareIndex, ());
LLDB_REGISTER_METHOD(lldb::addr_t, SBWatchpoint, GetWatchAddress, ());
diff --git a/lldb/source/API/SBSection.cpp b/lldb/source/API/SBSection.cpp
index 0f1a9a9..ca4d435 100644
--- a/lldb/source/API/SBSection.cpp
+++ b/lldb/source/API/SBSection.cpp
@@ -48,6 +48,10 @@
bool SBSection::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSection, IsValid);
+ return this->operator bool();
+}
+SBSection::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSection, operator bool);
SectionSP section_sp(GetSP());
return section_sp && section_sp->GetModule().get() != NULL;
diff --git a/lldb/source/API/SBStream.cpp b/lldb/source/API/SBStream.cpp
index c1fc455..9f9ec90 100644
--- a/lldb/source/API/SBStream.cpp
+++ b/lldb/source/API/SBStream.cpp
@@ -29,6 +29,10 @@
bool SBStream::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStream, IsValid);
+ return this->operator bool();
+}
+SBStream::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStream, operator bool);
return (m_opaque_up != NULL);
}
diff --git a/lldb/source/API/SBStringList.cpp b/lldb/source/API/SBStringList.cpp
index a248468..5a14bf8 100644
--- a/lldb/source/API/SBStringList.cpp
+++ b/lldb/source/API/SBStringList.cpp
@@ -51,6 +51,10 @@
bool SBStringList::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStringList, IsValid);
+ return this->operator bool();
+}
+SBStringList::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStringList, operator bool);
return (m_opaque_up != NULL);
}
diff --git a/lldb/source/API/SBStructuredData.cpp b/lldb/source/API/SBStructuredData.cpp
index 9c06015..97d771d 100644
--- a/lldb/source/API/SBStructuredData.cpp
+++ b/lldb/source/API/SBStructuredData.cpp
@@ -74,6 +74,10 @@
bool SBStructuredData::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStructuredData, IsValid);
+ return this->operator bool();
+}
+SBStructuredData::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBStructuredData, operator bool);
return m_impl_up->IsValid();
}
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index a72c23b..791a43f 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -45,6 +45,10 @@
bool SBSymbol::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbol, IsValid);
+ return this->operator bool();
+}
+SBSymbol::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbol, operator bool);
return m_opaque_ptr != NULL;
}
diff --git a/lldb/source/API/SBSymbolContext.cpp b/lldb/source/API/SBSymbolContext.cpp
index 4b81661..5b57c6c 100644
--- a/lldb/source/API/SBSymbolContext.cpp
+++ b/lldb/source/API/SBSymbolContext.cpp
@@ -58,6 +58,10 @@
bool SBSymbolContext::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbolContext, IsValid);
+ return this->operator bool();
+}
+SBSymbolContext::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbolContext, operator bool);
return m_opaque_up != NULL;
}
diff --git a/lldb/source/API/SBSymbolContextList.cpp b/lldb/source/API/SBSymbolContextList.cpp
index 55943a7..86c89a5 100644
--- a/lldb/source/API/SBSymbolContextList.cpp
+++ b/lldb/source/API/SBSymbolContextList.cpp
@@ -88,6 +88,10 @@
bool SBSymbolContextList::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbolContextList, IsValid);
+ return this->operator bool();
+}
+SBSymbolContextList::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBSymbolContextList, operator bool);
return m_opaque_up != NULL;
}
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index fd8aa8a..96bb807 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -170,6 +170,10 @@
bool SBTarget::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTarget, IsValid);
+ return this->operator bool();
+}
+SBTarget::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTarget, operator bool);
return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid();
}
diff --git a/lldb/source/API/SBThread.cpp b/lldb/source/API/SBThread.cpp
index 771444c..f437db6 100644
--- a/lldb/source/API/SBThread.cpp
+++ b/lldb/source/API/SBThread.cpp
@@ -115,6 +115,10 @@
bool SBThread::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThread, IsValid);
+ return this->operator bool();
+}
+SBThread::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThread, operator bool);
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
diff --git a/lldb/source/API/SBThreadCollection.cpp b/lldb/source/API/SBThreadCollection.cpp
index b9c1e75..90c5f81 100644
--- a/lldb/source/API/SBThreadCollection.cpp
+++ b/lldb/source/API/SBThreadCollection.cpp
@@ -62,6 +62,10 @@
bool SBThreadCollection::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadCollection, IsValid);
+ return this->operator bool();
+}
+SBThreadCollection::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadCollection, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBThreadPlan.cpp b/lldb/source/API/SBThreadPlan.cpp
index f8646fcd..fdbda1b 100644
--- a/lldb/source/API/SBThreadPlan.cpp
+++ b/lldb/source/API/SBThreadPlan.cpp
@@ -97,6 +97,10 @@
bool SBThreadPlan::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadPlan, IsValid);
+ return this->operator bool();
+}
+SBThreadPlan::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBThreadPlan, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBTrace.cpp b/lldb/source/API/SBTrace.cpp
index 1322bcc..e7b4ad6 100644
--- a/lldb/source/API/SBTrace.cpp
+++ b/lldb/source/API/SBTrace.cpp
@@ -116,6 +116,10 @@
bool SBTrace::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBTrace, IsValid);
+ return this->operator bool();
+}
+SBTrace::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTrace, operator bool);
if (!m_trace_impl_sp)
return false;
diff --git a/lldb/source/API/SBTraceOptions.cpp b/lldb/source/API/SBTraceOptions.cpp
index a9c799a..2512b7d 100644
--- a/lldb/source/API/SBTraceOptions.cpp
+++ b/lldb/source/API/SBTraceOptions.cpp
@@ -104,6 +104,10 @@
bool SBTraceOptions::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBTraceOptions, IsValid);
+ return this->operator bool();
+}
+SBTraceOptions::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTraceOptions, operator bool);
if (m_traceoptions_sp)
return true;
diff --git a/lldb/source/API/SBType.cpp b/lldb/source/API/SBType.cpp
index f861558..7c002db 100644
--- a/lldb/source/API/SBType.cpp
+++ b/lldb/source/API/SBType.cpp
@@ -107,6 +107,10 @@
bool SBType::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBType, IsValid);
+ return this->operator bool();
+}
+SBType::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBType, operator bool);
if (m_opaque_sp.get() == NULL)
return false;
@@ -570,6 +574,10 @@
bool SBTypeList::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBTypeList, IsValid);
+ return this->operator bool();
+}
+SBTypeList::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeList, operator bool);
return (m_opaque_up != NULL);
}
@@ -639,6 +647,10 @@
bool SBTypeMember::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeMember, IsValid);
+ return this->operator bool();
+}
+SBTypeMember::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeMember, operator bool);
return m_opaque_up.get();
}
@@ -764,6 +776,10 @@
bool SBTypeMemberFunction::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeMemberFunction, IsValid);
+ return this->operator bool();
+}
+SBTypeMemberFunction::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeMemberFunction, operator bool);
return m_opaque_sp.get();
}
diff --git a/lldb/source/API/SBTypeCategory.cpp b/lldb/source/API/SBTypeCategory.cpp
index 22eff9f..dac9f8a 100644
--- a/lldb/source/API/SBTypeCategory.cpp
+++ b/lldb/source/API/SBTypeCategory.cpp
@@ -44,6 +44,10 @@
bool SBTypeCategory::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeCategory, IsValid);
+ return this->operator bool();
+}
+SBTypeCategory::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeCategory, operator bool);
return (m_opaque_sp.get() != NULL);
}
diff --git a/lldb/source/API/SBTypeEnumMember.cpp b/lldb/source/API/SBTypeEnumMember.cpp
index 0a39f91..5b07e4c 100644
--- a/lldb/source/API/SBTypeEnumMember.cpp
+++ b/lldb/source/API/SBTypeEnumMember.cpp
@@ -50,6 +50,10 @@
bool SBTypeEnumMember::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeEnumMember, IsValid);
+ return this->operator bool();
+}
+SBTypeEnumMember::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeEnumMember, operator bool);
return m_opaque_sp.get();
}
@@ -120,6 +124,10 @@
bool SBTypeEnumMemberList::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBTypeEnumMemberList, IsValid);
+ return this->operator bool();
+}
+SBTypeEnumMemberList::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeEnumMemberList, operator bool);
return (m_opaque_up != NULL);
}
diff --git a/lldb/source/API/SBTypeFilter.cpp b/lldb/source/API/SBTypeFilter.cpp
index 53ae9fd..3cd9d30 100644
--- a/lldb/source/API/SBTypeFilter.cpp
+++ b/lldb/source/API/SBTypeFilter.cpp
@@ -35,6 +35,10 @@
bool SBTypeFilter::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeFilter, IsValid);
+ return this->operator bool();
+}
+SBTypeFilter::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeFilter, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBTypeFormat.cpp b/lldb/source/API/SBTypeFormat.cpp
index 667bca8..41c2694 100644
--- a/lldb/source/API/SBTypeFormat.cpp
+++ b/lldb/source/API/SBTypeFormat.cpp
@@ -44,6 +44,10 @@
bool SBTypeFormat::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeFormat, IsValid);
+ return this->operator bool();
+}
+SBTypeFormat::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeFormat, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBTypeNameSpecifier.cpp b/lldb/source/API/SBTypeNameSpecifier.cpp
index 6f6d59e..875391f 100644
--- a/lldb/source/API/SBTypeNameSpecifier.cpp
+++ b/lldb/source/API/SBTypeNameSpecifier.cpp
@@ -49,6 +49,10 @@
bool SBTypeNameSpecifier::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeNameSpecifier, IsValid);
+ return this->operator bool();
+}
+SBTypeNameSpecifier::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeNameSpecifier, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBTypeSummary.cpp b/lldb/source/API/SBTypeSummary.cpp
index e6858df..0c89411 100644
--- a/lldb/source/API/SBTypeSummary.cpp
+++ b/lldb/source/API/SBTypeSummary.cpp
@@ -37,6 +37,10 @@
bool SBTypeSummaryOptions::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBTypeSummaryOptions, IsValid);
+ return this->operator bool();
+}
+SBTypeSummaryOptions::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSummaryOptions, operator bool);
return m_opaque_up.get();
}
@@ -193,6 +197,10 @@
bool SBTypeSummary::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSummary, IsValid);
+ return this->operator bool();
+}
+SBTypeSummary::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSummary, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBTypeSynthetic.cpp b/lldb/source/API/SBTypeSynthetic.cpp
index 1c6625e..5558203 100644
--- a/lldb/source/API/SBTypeSynthetic.cpp
+++ b/lldb/source/API/SBTypeSynthetic.cpp
@@ -57,6 +57,10 @@
bool SBTypeSynthetic::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSynthetic, IsValid);
+ return this->operator bool();
+}
+SBTypeSynthetic::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTypeSynthetic, operator bool);
return m_opaque_sp.get() != NULL;
}
diff --git a/lldb/source/API/SBUnixSignals.cpp b/lldb/source/API/SBUnixSignals.cpp
index 625069a..26a5be9 100644
--- a/lldb/source/API/SBUnixSignals.cpp
+++ b/lldb/source/API/SBUnixSignals.cpp
@@ -59,6 +59,10 @@
bool SBUnixSignals::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBUnixSignals, IsValid);
+ return this->operator bool();
+}
+SBUnixSignals::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBUnixSignals, operator bool);
return static_cast<bool>(GetSP());
}
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 1990907..6ed526c 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -243,6 +243,10 @@
bool SBValue::IsValid() {
LLDB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsValid);
+ return this->operator bool();
+}
+SBValue::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBValue, operator bool);
// If this function ever changes to anything that does more than just check
// if the opaque shared pointer is non NULL, then we need to update all "if
diff --git a/lldb/source/API/SBValueList.cpp b/lldb/source/API/SBValueList.cpp
index 914da81..db4ec84 100644
--- a/lldb/source/API/SBValueList.cpp
+++ b/lldb/source/API/SBValueList.cpp
@@ -87,6 +87,10 @@
bool SBValueList::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBValueList, IsValid);
+ return this->operator bool();
+}
+SBValueList::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBValueList, operator bool);
return (m_opaque_up != NULL);
}
diff --git a/lldb/source/API/SBVariablesOptions.cpp b/lldb/source/API/SBVariablesOptions.cpp
index e278cb0..52feb01 100644
--- a/lldb/source/API/SBVariablesOptions.cpp
+++ b/lldb/source/API/SBVariablesOptions.cpp
@@ -106,6 +106,10 @@
bool SBVariablesOptions::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, IsValid);
+ return this->operator bool();
+}
+SBVariablesOptions::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBVariablesOptions, operator bool);
return m_opaque_up != nullptr;
}
diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp
index 7e049fd..11113ae 100644
--- a/lldb/source/API/SBWatchpoint.cpp
+++ b/lldb/source/API/SBWatchpoint.cpp
@@ -62,6 +62,10 @@
bool SBWatchpoint::IsValid() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBWatchpoint, IsValid);
+ return this->operator bool();
+}
+SBWatchpoint::operator bool() const {
+ LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBWatchpoint, operator bool);
return bool(m_opaque_wp.lock());
}