[Lldb-commits] [lldb] r355824 - Add "operator bool" to SB APIs

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 11 06:58:47 PDT 2019


Author: labath
Date: Mon Mar 11 06:58:46 2019
New Revision: 355824

URL: http://llvm.org/viewvc/llvm-project?rev=355824&view=rev
Log:
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

Modified:
    lldb/trunk/include/lldb/API/SBAddress.h
    lldb/trunk/include/lldb/API/SBBlock.h
    lldb/trunk/include/lldb/API/SBBreakpoint.h
    lldb/trunk/include/lldb/API/SBBreakpointLocation.h
    lldb/trunk/include/lldb/API/SBBreakpointName.h
    lldb/trunk/include/lldb/API/SBBroadcaster.h
    lldb/trunk/include/lldb/API/SBCommandInterpreter.h
    lldb/trunk/include/lldb/API/SBCommandReturnObject.h
    lldb/trunk/include/lldb/API/SBCommunication.h
    lldb/trunk/include/lldb/API/SBCompileUnit.h
    lldb/trunk/include/lldb/API/SBData.h
    lldb/trunk/include/lldb/API/SBDebugger.h
    lldb/trunk/include/lldb/API/SBDeclaration.h
    lldb/trunk/include/lldb/API/SBError.h
    lldb/trunk/include/lldb/API/SBEvent.h
    lldb/trunk/include/lldb/API/SBFileSpec.h
    lldb/trunk/include/lldb/API/SBFrame.h
    lldb/trunk/include/lldb/API/SBFunction.h
    lldb/trunk/include/lldb/API/SBInstruction.h
    lldb/trunk/include/lldb/API/SBInstructionList.h
    lldb/trunk/include/lldb/API/SBLineEntry.h
    lldb/trunk/include/lldb/API/SBListener.h
    lldb/trunk/include/lldb/API/SBModule.h
    lldb/trunk/include/lldb/API/SBModuleSpec.h
    lldb/trunk/include/lldb/API/SBPlatform.h
    lldb/trunk/include/lldb/API/SBProcess.h
    lldb/trunk/include/lldb/API/SBProcessInfo.h
    lldb/trunk/include/lldb/API/SBQueue.h
    lldb/trunk/include/lldb/API/SBQueueItem.h
    lldb/trunk/include/lldb/API/SBSection.h
    lldb/trunk/include/lldb/API/SBStream.h
    lldb/trunk/include/lldb/API/SBStringList.h
    lldb/trunk/include/lldb/API/SBStructuredData.h
    lldb/trunk/include/lldb/API/SBSymbol.h
    lldb/trunk/include/lldb/API/SBSymbolContext.h
    lldb/trunk/include/lldb/API/SBSymbolContextList.h
    lldb/trunk/include/lldb/API/SBTarget.h
    lldb/trunk/include/lldb/API/SBThread.h
    lldb/trunk/include/lldb/API/SBThreadCollection.h
    lldb/trunk/include/lldb/API/SBThreadPlan.h
    lldb/trunk/include/lldb/API/SBTrace.h
    lldb/trunk/include/lldb/API/SBTraceOptions.h
    lldb/trunk/include/lldb/API/SBType.h
    lldb/trunk/include/lldb/API/SBTypeCategory.h
    lldb/trunk/include/lldb/API/SBTypeEnumMember.h
    lldb/trunk/include/lldb/API/SBTypeFilter.h
    lldb/trunk/include/lldb/API/SBTypeFormat.h
    lldb/trunk/include/lldb/API/SBTypeNameSpecifier.h
    lldb/trunk/include/lldb/API/SBTypeSummary.h
    lldb/trunk/include/lldb/API/SBTypeSynthetic.h
    lldb/trunk/include/lldb/API/SBUnixSignals.h
    lldb/trunk/include/lldb/API/SBValue.h
    lldb/trunk/include/lldb/API/SBValueList.h
    lldb/trunk/include/lldb/API/SBVariablesOptions.h
    lldb/trunk/include/lldb/API/SBWatchpoint.h
    lldb/trunk/scripts/Python/modify-python-lldb.py
    lldb/trunk/scripts/interface/SBAddress.i
    lldb/trunk/scripts/interface/SBBlock.i
    lldb/trunk/scripts/interface/SBBreakpoint.i
    lldb/trunk/scripts/interface/SBBreakpointLocation.i
    lldb/trunk/scripts/interface/SBBreakpointName.i
    lldb/trunk/scripts/interface/SBBroadcaster.i
    lldb/trunk/scripts/interface/SBCommandInterpreter.i
    lldb/trunk/scripts/interface/SBCommandReturnObject.i
    lldb/trunk/scripts/interface/SBCommunication.i
    lldb/trunk/scripts/interface/SBCompileUnit.i
    lldb/trunk/scripts/interface/SBData.i
    lldb/trunk/scripts/interface/SBDebugger.i
    lldb/trunk/scripts/interface/SBDeclaration.i
    lldb/trunk/scripts/interface/SBError.i
    lldb/trunk/scripts/interface/SBEvent.i
    lldb/trunk/scripts/interface/SBFileSpec.i
    lldb/trunk/scripts/interface/SBFrame.i
    lldb/trunk/scripts/interface/SBFunction.i
    lldb/trunk/scripts/interface/SBInstruction.i
    lldb/trunk/scripts/interface/SBInstructionList.i
    lldb/trunk/scripts/interface/SBLineEntry.i
    lldb/trunk/scripts/interface/SBListener.i
    lldb/trunk/scripts/interface/SBModule.i
    lldb/trunk/scripts/interface/SBModuleSpec.i
    lldb/trunk/scripts/interface/SBPlatform.i
    lldb/trunk/scripts/interface/SBProcess.i
    lldb/trunk/scripts/interface/SBProcessInfo.i
    lldb/trunk/scripts/interface/SBQueue.i
    lldb/trunk/scripts/interface/SBQueueItem.i
    lldb/trunk/scripts/interface/SBSection.i
    lldb/trunk/scripts/interface/SBStream.i
    lldb/trunk/scripts/interface/SBStringList.i
    lldb/trunk/scripts/interface/SBStructuredData.i
    lldb/trunk/scripts/interface/SBSymbol.i
    lldb/trunk/scripts/interface/SBSymbolContext.i
    lldb/trunk/scripts/interface/SBSymbolContextList.i
    lldb/trunk/scripts/interface/SBTarget.i
    lldb/trunk/scripts/interface/SBThread.i
    lldb/trunk/scripts/interface/SBThreadCollection.i
    lldb/trunk/scripts/interface/SBThreadPlan.i
    lldb/trunk/scripts/interface/SBTrace.i
    lldb/trunk/scripts/interface/SBTraceOptions.i
    lldb/trunk/scripts/interface/SBType.i
    lldb/trunk/scripts/interface/SBTypeCategory.i
    lldb/trunk/scripts/interface/SBTypeEnumMember.i
    lldb/trunk/scripts/interface/SBTypeFilter.i
    lldb/trunk/scripts/interface/SBTypeFormat.i
    lldb/trunk/scripts/interface/SBTypeNameSpecifier.i
    lldb/trunk/scripts/interface/SBTypeSummary.i
    lldb/trunk/scripts/interface/SBTypeSynthetic.i
    lldb/trunk/scripts/interface/SBUnixSignals.i
    lldb/trunk/scripts/interface/SBValue.i
    lldb/trunk/scripts/interface/SBValueList.i
    lldb/trunk/scripts/interface/SBVariablesOptions.i
    lldb/trunk/scripts/interface/SBWatchpoint.i
    lldb/trunk/scripts/lldb.swig
    lldb/trunk/source/API/SBAddress.cpp
    lldb/trunk/source/API/SBBlock.cpp
    lldb/trunk/source/API/SBBreakpoint.cpp
    lldb/trunk/source/API/SBBreakpointLocation.cpp
    lldb/trunk/source/API/SBBreakpointName.cpp
    lldb/trunk/source/API/SBBroadcaster.cpp
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBCommandReturnObject.cpp
    lldb/trunk/source/API/SBCommunication.cpp
    lldb/trunk/source/API/SBCompileUnit.cpp
    lldb/trunk/source/API/SBData.cpp
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBDeclaration.cpp
    lldb/trunk/source/API/SBError.cpp
    lldb/trunk/source/API/SBEvent.cpp
    lldb/trunk/source/API/SBFileSpec.cpp
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/API/SBFunction.cpp
    lldb/trunk/source/API/SBInstruction.cpp
    lldb/trunk/source/API/SBInstructionList.cpp
    lldb/trunk/source/API/SBLineEntry.cpp
    lldb/trunk/source/API/SBListener.cpp
    lldb/trunk/source/API/SBModule.cpp
    lldb/trunk/source/API/SBModuleSpec.cpp
    lldb/trunk/source/API/SBPlatform.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBProcessInfo.cpp
    lldb/trunk/source/API/SBQueue.cpp
    lldb/trunk/source/API/SBQueueItem.cpp
    lldb/trunk/source/API/SBReproducer.cpp
    lldb/trunk/source/API/SBSection.cpp
    lldb/trunk/source/API/SBStream.cpp
    lldb/trunk/source/API/SBStringList.cpp
    lldb/trunk/source/API/SBStructuredData.cpp
    lldb/trunk/source/API/SBSymbol.cpp
    lldb/trunk/source/API/SBSymbolContext.cpp
    lldb/trunk/source/API/SBSymbolContextList.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/API/SBThread.cpp
    lldb/trunk/source/API/SBThreadCollection.cpp
    lldb/trunk/source/API/SBThreadPlan.cpp
    lldb/trunk/source/API/SBTrace.cpp
    lldb/trunk/source/API/SBTraceOptions.cpp
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/API/SBTypeCategory.cpp
    lldb/trunk/source/API/SBTypeEnumMember.cpp
    lldb/trunk/source/API/SBTypeFilter.cpp
    lldb/trunk/source/API/SBTypeFormat.cpp
    lldb/trunk/source/API/SBTypeNameSpecifier.cpp
    lldb/trunk/source/API/SBTypeSummary.cpp
    lldb/trunk/source/API/SBTypeSynthetic.cpp
    lldb/trunk/source/API/SBUnixSignals.cpp
    lldb/trunk/source/API/SBValue.cpp
    lldb/trunk/source/API/SBValueList.cpp
    lldb/trunk/source/API/SBVariablesOptions.cpp
    lldb/trunk/source/API/SBWatchpoint.cpp

Modified: lldb/trunk/include/lldb/API/SBAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBAddress.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBAddress.h (original)
+++ lldb/trunk/include/lldb/API/SBAddress.h Mon Mar 11 06:58:46 2019
@@ -29,6 +29,8 @@ public:
 
   const lldb::SBAddress &operator=(const lldb::SBAddress &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBBlock.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBlock.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBlock.h (original)
+++ lldb/trunk/include/lldb/API/SBBlock.h Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
 
   bool IsInlined() const;
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetInlinedName() const;

Modified: lldb/trunk/include/lldb/API/SBBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpoint.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpoint.h Mon Mar 11 06:58:46 2019
@@ -36,6 +36,8 @@ public:
 
   break_id_t GetID() const;
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void ClearAllBreakpointSites();

Modified: lldb/trunk/include/lldb/API/SBBreakpointLocation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpointLocation.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpointLocation.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpointLocation.h Mon Mar 11 06:58:46 2019
@@ -27,6 +27,8 @@ public:
 
   break_id_t GetID();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBAddress GetAddress();

Modified: lldb/trunk/include/lldb/API/SBBreakpointName.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBreakpointName.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBreakpointName.h (original)
+++ lldb/trunk/include/lldb/API/SBBreakpointName.h Mon Mar 11 06:58:46 2019
@@ -39,6 +39,8 @@ public:
 
   bool operator!=(const lldb::SBBreakpointName &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
   
   const char *GetName() const;

Modified: lldb/trunk/include/lldb/API/SBBroadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBBroadcaster.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBBroadcaster.h (original)
+++ lldb/trunk/include/lldb/API/SBBroadcaster.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
 
   ~SBBroadcaster();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Mon Mar 11 06:58:46 2019
@@ -87,6 +87,8 @@ public:
 
   static bool EventIsCommandInterpreterEvent(const lldb::SBEvent &event);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool CommandExists(const char *cmd);
@@ -272,6 +274,8 @@ class SBCommand {
 public:
   SBCommand();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   const char *GetName();

Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Mon Mar 11 06:58:46 2019
@@ -32,6 +32,8 @@ public:
 
   lldb_private::CommandReturnObject *Release();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetOutput();

Modified: lldb/trunk/include/lldb/API/SBCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommunication.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommunication.h (original)
+++ lldb/trunk/include/lldb/API/SBCommunication.h Mon Mar 11 06:58:46 2019
@@ -37,6 +37,8 @@ public:
   SBCommunication(const char *broadcaster_name);
   ~SBCommunication();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBBroadcaster GetBroadcaster();

Modified: lldb/trunk/include/lldb/API/SBCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCompileUnit.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCompileUnit.h (original)
+++ lldb/trunk/include/lldb/API/SBCompileUnit.h Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ public:
 
   const lldb::SBCompileUnit &operator=(const lldb::SBCompileUnit &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBFileSpec GetFileSpec() const;

Modified: lldb/trunk/include/lldb/API/SBData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBData.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBData.h (original)
+++ lldb/trunk/include/lldb/API/SBData.h Mon Mar 11 06:58:46 2019
@@ -29,6 +29,8 @@ public:
 
   void Clear();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   size_t GetByteSize();

Modified: lldb/trunk/include/lldb/API/SBDebugger.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDebugger.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDebugger.h (original)
+++ lldb/trunk/include/lldb/API/SBDebugger.h Mon Mar 11 06:58:46 2019
@@ -62,6 +62,8 @@ public:
 
   static void MemoryPressureDetected();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBDeclaration.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBDeclaration.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBDeclaration.h (original)
+++ lldb/trunk/include/lldb/API/SBDeclaration.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
 
   const lldb::SBDeclaration &operator=(const lldb::SBDeclaration &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBFileSpec GetFileSpec() const;

Modified: lldb/trunk/include/lldb/API/SBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBError.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBError.h (original)
+++ lldb/trunk/include/lldb/API/SBError.h Mon Mar 11 06:58:46 2019
@@ -46,6 +46,8 @@ public:
   int SetErrorStringWithFormat(const char *format, ...)
       __attribute__((format(printf, 2, 3)));
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool GetDescription(lldb::SBStream &description);

Modified: lldb/trunk/include/lldb/API/SBEvent.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBEvent.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBEvent.h (original)
+++ lldb/trunk/include/lldb/API/SBEvent.h Mon Mar 11 06:58:46 2019
@@ -35,6 +35,8 @@ public:
 
   const SBEvent &operator=(const lldb::SBEvent &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetDataFlavor();

Modified: lldb/trunk/include/lldb/API/SBFileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFileSpec.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFileSpec.h (original)
+++ lldb/trunk/include/lldb/API/SBFileSpec.h Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
 
   const SBFileSpec &operator=(const lldb::SBFileSpec &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool Exists() const;

Modified: lldb/trunk/include/lldb/API/SBFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFrame.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFrame.h (original)
+++ lldb/trunk/include/lldb/API/SBFrame.h Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
 
   bool IsEqual(const lldb::SBFrame &that) const;
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   uint32_t GetFrameID() const;

Modified: lldb/trunk/include/lldb/API/SBFunction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFunction.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFunction.h (original)
+++ lldb/trunk/include/lldb/API/SBFunction.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
 
   ~SBFunction();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName() const;

Modified: lldb/trunk/include/lldb/API/SBInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstruction.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstruction.h (original)
+++ lldb/trunk/include/lldb/API/SBInstruction.h Mon Mar 11 06:58:46 2019
@@ -31,6 +31,8 @@ public:
 
   ~SBInstruction();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   SBAddress GetAddress();

Modified: lldb/trunk/include/lldb/API/SBInstructionList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBInstructionList.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBInstructionList.h (original)
+++ lldb/trunk/include/lldb/API/SBInstructionList.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
 
   ~SBInstructionList();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   size_t GetSize();

Modified: lldb/trunk/include/lldb/API/SBLineEntry.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBLineEntry.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBLineEntry.h (original)
+++ lldb/trunk/include/lldb/API/SBLineEntry.h Mon Mar 11 06:58:46 2019
@@ -29,6 +29,8 @@ public:
 
   lldb::SBAddress GetEndAddress() const;
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBFileSpec GetFileSpec() const;

Modified: lldb/trunk/include/lldb/API/SBListener.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBListener.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBListener.h (original)
+++ lldb/trunk/include/lldb/API/SBListener.h Mon Mar 11 06:58:46 2019
@@ -29,6 +29,8 @@ public:
 
   void Clear();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   uint32_t StartListeningForEventClass(SBDebugger &debugger,

Modified: lldb/trunk/include/lldb/API/SBModule.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBModule.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBModule.h (original)
+++ lldb/trunk/include/lldb/API/SBModule.h Mon Mar 11 06:58:46 2019
@@ -31,6 +31,8 @@ public:
 
   ~SBModule();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBModuleSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBModuleSpec.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBModuleSpec.h (original)
+++ lldb/trunk/include/lldb/API/SBModuleSpec.h Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ public:
 
   const SBModuleSpec &operator=(const SBModuleSpec &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBPlatform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBPlatform.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBPlatform.h (original)
+++ lldb/trunk/include/lldb/API/SBPlatform.h Mon Mar 11 06:58:46 2019
@@ -91,6 +91,8 @@ public:
 
   ~SBPlatform();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBProcess.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcess.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBProcess.h (original)
+++ lldb/trunk/include/lldb/API/SBProcess.h Mon Mar 11 06:58:46 2019
@@ -51,6 +51,8 @@ public:
 
   void Clear();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBTarget GetTarget() const;

Modified: lldb/trunk/include/lldb/API/SBProcessInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBProcessInfo.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBProcessInfo.h (original)
+++ lldb/trunk/include/lldb/API/SBProcessInfo.h Mon Mar 11 06:58:46 2019
@@ -22,6 +22,8 @@ public:
 
   SBProcessInfo &operator=(const SBProcessInfo &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName();

Modified: lldb/trunk/include/lldb/API/SBQueue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBQueue.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBQueue.h (original)
+++ lldb/trunk/include/lldb/API/SBQueue.h Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
 
   ~SBQueue();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBQueueItem.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBQueueItem.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBQueueItem.h (original)
+++ lldb/trunk/include/lldb/API/SBQueueItem.h Mon Mar 11 06:58:46 2019
@@ -22,6 +22,8 @@ public:
 
   ~SBQueueItem();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBSection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSection.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSection.h (original)
+++ lldb/trunk/include/lldb/API/SBSection.h Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ public:
 
   const lldb::SBSection &operator=(const lldb::SBSection &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName();

Modified: lldb/trunk/include/lldb/API/SBStream.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStream.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStream.h (original)
+++ lldb/trunk/include/lldb/API/SBStream.h Mon Mar 11 06:58:46 2019
@@ -23,6 +23,8 @@ public:
 
   ~SBStream();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   // If this stream is not redirected to a file, it will maintain a local cache

Modified: lldb/trunk/include/lldb/API/SBStringList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStringList.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStringList.h (original)
+++ lldb/trunk/include/lldb/API/SBStringList.h Mon Mar 11 06:58:46 2019
@@ -23,6 +23,8 @@ public:
 
   ~SBStringList();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void AppendString(const char *str);

Modified: lldb/trunk/include/lldb/API/SBStructuredData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBStructuredData.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBStructuredData.h (original)
+++ lldb/trunk/include/lldb/API/SBStructuredData.h Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
 
   lldb::SBStructuredData &operator=(const lldb::SBStructuredData &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::SBError SetFromJSON(lldb::SBStream &stream);

Modified: lldb/trunk/include/lldb/API/SBSymbol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbol.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbol.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbol.h Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
 
   const lldb::SBSymbol &operator=(const lldb::SBSymbol &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName() const;

Modified: lldb/trunk/include/lldb/API/SBSymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbolContext.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbolContext.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbolContext.h Mon Mar 11 06:58:46 2019
@@ -29,6 +29,8 @@ public:
 
   ~SBSymbolContext();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const lldb::SBSymbolContext &operator=(const lldb::SBSymbolContext &rhs);

Modified: lldb/trunk/include/lldb/API/SBSymbolContextList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBSymbolContextList.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBSymbolContextList.h (original)
+++ lldb/trunk/include/lldb/API/SBSymbolContextList.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
   const lldb::SBSymbolContextList &
   operator=(const lldb::SBSymbolContextList &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   uint32_t GetSize() const;

Modified: lldb/trunk/include/lldb/API/SBTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTarget.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTarget.h (original)
+++ lldb/trunk/include/lldb/API/SBTarget.h Mon Mar 11 06:58:46 2019
@@ -55,6 +55,8 @@ public:
 
   const lldb::SBTarget &operator=(const lldb::SBTarget &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   static bool EventIsTargetEvent(const lldb::SBEvent &event);

Modified: lldb/trunk/include/lldb/API/SBThread.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThread.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBThread.h (original)
+++ lldb/trunk/include/lldb/API/SBThread.h Mon Mar 11 06:58:46 2019
@@ -39,6 +39,8 @@ public:
 
   lldb::SBQueue GetQueue() const;
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBThreadCollection.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThreadCollection.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBThreadCollection.h (original)
+++ lldb/trunk/include/lldb/API/SBThreadCollection.h Mon Mar 11 06:58:46 2019
@@ -23,6 +23,8 @@ public:
 
   ~SBThreadCollection();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   size_t GetSize();

Modified: lldb/trunk/include/lldb/API/SBThreadPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBThreadPlan.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBThreadPlan.h (original)
+++ lldb/trunk/include/lldb/API/SBThreadPlan.h Mon Mar 11 06:58:46 2019
@@ -30,6 +30,8 @@ public:
 
   ~SBThreadPlan();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBTrace.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTrace.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTrace.h (original)
+++ lldb/trunk/include/lldb/API/SBTrace.h Mon Mar 11 06:58:46 2019
@@ -100,6 +100,8 @@ public:
 
   lldb::user_id_t GetTraceUID();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
 protected:

Modified: lldb/trunk/include/lldb/API/SBTraceOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTraceOptions.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTraceOptions.h (original)
+++ lldb/trunk/include/lldb/API/SBTraceOptions.h Mon Mar 11 06:58:46 2019
@@ -44,6 +44,8 @@ public:
 
   lldb::tid_t getThreadID();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
 protected:

Modified: lldb/trunk/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
 
   lldb::SBTypeMember &operator=(const lldb::SBTypeMember &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName();
@@ -64,6 +66,8 @@ public:
 
   lldb::SBTypeMemberFunction &operator=(const lldb::SBTypeMemberFunction &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName();
@@ -105,6 +109,8 @@ public:
 
   ~SBType();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   uint64_t GetByteSize();
@@ -235,6 +241,8 @@ public:
 
   lldb::SBTypeList &operator=(const lldb::SBTypeList &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   void Append(lldb::SBType type);

Modified: lldb/trunk/include/lldb/API/SBTypeCategory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeCategory.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeCategory.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeCategory.h Mon Mar 11 06:58:46 2019
@@ -22,6 +22,8 @@ public:
 
   ~SBTypeCategory();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool GetEnabled();

Modified: lldb/trunk/include/lldb/API/SBTypeEnumMember.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeEnumMember.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeEnumMember.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeEnumMember.h Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ public:
 
   SBTypeEnumMember &operator=(const SBTypeEnumMember &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   int64_t GetValueAsSigned();
@@ -62,6 +64,8 @@ public:
 
   SBTypeEnumMemberList &operator=(const SBTypeEnumMemberList &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   void Append(SBTypeEnumMember entry);

Modified: lldb/trunk/include/lldb/API/SBTypeFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeFilter.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeFilter.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeFilter.h Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ public:
 
   ~SBTypeFilter();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   uint32_t GetNumberOfExpressionPaths();

Modified: lldb/trunk/include/lldb/API/SBTypeFormat.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeFormat.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeFormat.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeFormat.h Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
 
   ~SBTypeFormat();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   lldb::Format GetFormat();

Modified: lldb/trunk/include/lldb/API/SBTypeNameSpecifier.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeNameSpecifier.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeNameSpecifier.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeNameSpecifier.h Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
 
   ~SBTypeNameSpecifier();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetName();

Modified: lldb/trunk/include/lldb/API/SBTypeSummary.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeSummary.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeSummary.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeSummary.h Mon Mar 11 06:58:46 2019
@@ -23,6 +23,8 @@ public:
 
   ~SBTypeSummaryOptions();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   lldb::LanguageType GetLanguage();
@@ -79,6 +81,8 @@ public:
 
   ~SBTypeSummary();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool IsFunctionCode();

Modified: lldb/trunk/include/lldb/API/SBTypeSynthetic.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBTypeSynthetic.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBTypeSynthetic.h (original)
+++ lldb/trunk/include/lldb/API/SBTypeSynthetic.h Mon Mar 11 06:58:46 2019
@@ -32,6 +32,8 @@ public:
 
   ~SBTypeSynthetic();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool IsClassCode();

Modified: lldb/trunk/include/lldb/API/SBUnixSignals.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBUnixSignals.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBUnixSignals.h (original)
+++ lldb/trunk/include/lldb/API/SBUnixSignals.h Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
 
   void Clear();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   const char *GetSignalAsCString(int32_t signo) const;

Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
 
   ~SBValue();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBValueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValueList.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValueList.h (original)
+++ lldb/trunk/include/lldb/API/SBValueList.h Mon Mar 11 06:58:46 2019
@@ -23,6 +23,8 @@ public:
 
   ~SBValueList();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   void Clear();

Modified: lldb/trunk/include/lldb/API/SBVariablesOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBVariablesOptions.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBVariablesOptions.h (original)
+++ lldb/trunk/include/lldb/API/SBVariablesOptions.h Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
 
   ~SBVariablesOptions();
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   bool GetIncludeArguments() const;

Modified: lldb/trunk/include/lldb/API/SBWatchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBWatchpoint.h?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBWatchpoint.h (original)
+++ lldb/trunk/include/lldb/API/SBWatchpoint.h Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
 
   const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
 
   SBError GetError();

Modified: lldb/trunk/scripts/Python/modify-python-lldb.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modify-python-lldb.py?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/modify-python-lldb.py (original)
+++ lldb/trunk/scripts/Python/modify-python-lldb.py Mon Mar 11 06:58:46 2019
@@ -91,16 +91,6 @@ len_def = "    def __len__(self): return
 eq_def = "    def __eq__(self, other): return isinstance(other, %s) and %s"
 ne_def = "    def __ne__(self, other): return not self.__eq__(other)"
 
-# Called to implement truth value testing and the built-in operation bool();
-# Note that Python 2 uses __nonzero__(), whereas Python 3 uses __bool__()
-# should return False or True, or their integer equivalents 0 or 1.
-# Delegate to self.IsValid() if it is defined for the current lldb object.
-
-if six.PY2:
-    nonzero_def = "    def __nonzero__(self): return self.IsValid()"
-else:
-    nonzero_def = "    def __bool__(self): return self.IsValid()"
-
 # A convenience iterator for SBSymbol!
 symbol_in_section_iter_def = '''
     def symbol_in_section_iter(self, section):
@@ -332,11 +322,6 @@ for line in content.splitlines():
     if one_liner_docstring_pattern.match(line):
         line = char_to_str_xform(line)
 
-    # Look for 'def IsValid(*args):', and once located, add implementation
-    # of truth value testing for this object by delegation.
-    if isvalid_pattern.search(line):
-        new_content.add_line(nonzero_def)
-
     # Pass the original line of content to new_content.
     new_content.add_line(line)
 

Modified: lldb/trunk/scripts/interface/SBAddress.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBAddress.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBAddress.i (original)
+++ lldb/trunk/scripts/interface/SBAddress.i Mon Mar 11 06:58:46 2019
@@ -62,6 +62,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBBlock.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBBlock.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBBlock.i (original)
+++ lldb/trunk/scripts/interface/SBBlock.i Mon Mar 11 06:58:46 2019
@@ -30,6 +30,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     %feature("docstring", "
     Get the function name if this block represents an inlined function;
     otherwise, return None.

Modified: lldb/trunk/scripts/interface/SBBreakpoint.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBBreakpoint.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBBreakpoint.i (original)
+++ lldb/trunk/scripts/interface/SBBreakpoint.i Mon Mar 11 06:58:46 2019
@@ -91,6 +91,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     ClearAllBreakpointSites ();
 

Modified: lldb/trunk/scripts/interface/SBBreakpointLocation.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBBreakpointLocation.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBBreakpointLocation.i (original)
+++ lldb/trunk/scripts/interface/SBBreakpointLocation.i Mon Mar 11 06:58:46 2019
@@ -34,6 +34,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     lldb::SBAddress
     GetAddress();
     

Modified: lldb/trunk/scripts/interface/SBBreakpointName.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBBreakpointName.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBBreakpointName.i (original)
+++ lldb/trunk/scripts/interface/SBBreakpointName.i Mon Mar 11 06:58:46 2019
@@ -42,6 +42,8 @@ public:
 
   bool operator!=(const lldb::SBBreakpointName &rhs);
 
+  explicit operator bool() const;
+
   bool IsValid() const;
   
   const char *GetName() const;

Modified: lldb/trunk/scripts/interface/SBBroadcaster.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBBroadcaster.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBBroadcaster.i (original)
+++ lldb/trunk/scripts/interface/SBBroadcaster.i Mon Mar 11 06:58:46 2019
@@ -33,6 +33,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBCommandInterpreter.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBCommandInterpreter.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBCommandInterpreter.i (original)
+++ lldb/trunk/scripts/interface/SBCommandInterpreter.i Mon Mar 11 06:58:46 2019
@@ -145,6 +145,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     const char *
     GetIOHandlerControlSequence(char ch);
 

Modified: lldb/trunk/scripts/interface/SBCommandReturnObject.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBCommandReturnObject.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBCommandReturnObject.i (original)
+++ lldb/trunk/scripts/interface/SBCommandReturnObject.i Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     const char *
     GetOutput ();
 

Modified: lldb/trunk/scripts/interface/SBCommunication.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBCommunication.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBCommunication.i (original)
+++ lldb/trunk/scripts/interface/SBCommunication.i Mon Mar 11 06:58:46 2019
@@ -30,6 +30,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     lldb::SBBroadcaster
     GetBroadcaster ();
 

Modified: lldb/trunk/scripts/interface/SBCompileUnit.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBCompileUnit.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBCompileUnit.i (original)
+++ lldb/trunk/scripts/interface/SBCompileUnit.i Mon Mar 11 06:58:46 2019
@@ -56,6 +56,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     lldb::SBFileSpec
     GetFileSpec () const;
 

Modified: lldb/trunk/scripts/interface/SBData.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBData.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBData.i (original)
+++ lldb/trunk/scripts/interface/SBData.i Mon Mar 11 06:58:46 2019
@@ -31,6 +31,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     size_t
     GetByteSize ();
 

Modified: lldb/trunk/scripts/interface/SBDebugger.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBDebugger.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBDebugger.i (original)
+++ lldb/trunk/scripts/interface/SBDebugger.i Mon Mar 11 06:58:46 2019
@@ -152,6 +152,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBDeclaration.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBDeclaration.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBDeclaration.i (original)
+++ lldb/trunk/scripts/interface/SBDeclaration.i Mon Mar 11 06:58:46 2019
@@ -23,6 +23,8 @@ namespace lldb {
         
         bool
         IsValid () const;
+
+        explicit operator bool() const;
         
         lldb::SBFileSpec
         GetFileSpec () const;

Modified: lldb/trunk/scripts/interface/SBError.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBError.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBError.i (original)
+++ lldb/trunk/scripts/interface/SBError.i Mon Mar 11 06:58:46 2019
@@ -101,6 +101,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     bool
     GetDescription (lldb::SBStream &description);
     

Modified: lldb/trunk/scripts/interface/SBEvent.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBEvent.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBEvent.i (original)
+++ lldb/trunk/scripts/interface/SBEvent.i Mon Mar 11 06:58:46 2019
@@ -124,6 +124,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     const char *
     GetDataFlavor ();
 

Modified: lldb/trunk/scripts/interface/SBFileSpec.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBFileSpec.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBFileSpec.i (original)
+++ lldb/trunk/scripts/interface/SBFileSpec.i Mon Mar 11 06:58:46 2019
@@ -45,6 +45,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     bool
     Exists () const;
 

Modified: lldb/trunk/scripts/interface/SBFrame.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBFrame.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBFrame.i (original)
+++ lldb/trunk/scripts/interface/SBFrame.i Mon Mar 11 06:58:46 2019
@@ -59,6 +59,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     uint32_t
     GetFrameID () const;
 

Modified: lldb/trunk/scripts/interface/SBFunction.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBFunction.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBFunction.i (original)
+++ lldb/trunk/scripts/interface/SBFunction.i Mon Mar 11 06:58:46 2019
@@ -55,6 +55,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     const char *
     GetName() const;
     

Modified: lldb/trunk/scripts/interface/SBInstruction.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBInstruction.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBInstruction.i (original)
+++ lldb/trunk/scripts/interface/SBInstruction.i Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     lldb::SBAddress
     GetAddress();
 

Modified: lldb/trunk/scripts/interface/SBInstructionList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBInstructionList.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBInstructionList.i (original)
+++ lldb/trunk/scripts/interface/SBInstructionList.i Mon Mar 11 06:58:46 2019
@@ -37,6 +37,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     size_t
     GetSize ();
 

Modified: lldb/trunk/scripts/interface/SBLineEntry.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBLineEntry.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBLineEntry.i (original)
+++ lldb/trunk/scripts/interface/SBLineEntry.i Mon Mar 11 06:58:46 2019
@@ -55,6 +55,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     lldb::SBFileSpec
     GetFileSpec () const;
 

Modified: lldb/trunk/scripts/interface/SBListener.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBListener.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBListener.i (original)
+++ lldb/trunk/scripts/interface/SBListener.i Mon Mar 11 06:58:46 2019
@@ -33,6 +33,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     uint32_t
     StartListeningForEventClass (SBDebugger &debugger,
                                  const char *broadcaster_class, 

Modified: lldb/trunk/scripts/interface/SBModule.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBModule.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBModule.i (original)
+++ lldb/trunk/scripts/interface/SBModule.i Mon Mar 11 06:58:46 2019
@@ -130,6 +130,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     void
     Clear();
 

Modified: lldb/trunk/scripts/interface/SBModuleSpec.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBModuleSpec.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBModuleSpec.i (original)
+++ lldb/trunk/scripts/interface/SBModuleSpec.i Mon Mar 11 06:58:46 2019
@@ -20,6 +20,8 @@ public:
     
     bool
     IsValid () const;
+
+    explicit operator bool() const;
     
     void
     Clear();

Modified: lldb/trunk/scripts/interface/SBPlatform.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBPlatform.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBPlatform.i (original)
+++ lldb/trunk/scripts/interface/SBPlatform.i Mon Mar 11 06:58:46 2019
@@ -118,6 +118,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBProcess.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBProcess.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBProcess.i (original)
+++ lldb/trunk/scripts/interface/SBProcess.i Mon Mar 11 06:58:46 2019
@@ -68,6 +68,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     lldb::SBTarget
     GetTarget() const;
 

Modified: lldb/trunk/scripts/interface/SBProcessInfo.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBProcessInfo.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBProcessInfo.i (original)
+++ lldb/trunk/scripts/interface/SBProcessInfo.i Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
     bool
     IsValid ();
 
+    explicit operator bool() const;
+
     const char *
     GetName ();
 

Modified: lldb/trunk/scripts/interface/SBQueue.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBQueue.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBQueue.i (original)
+++ lldb/trunk/scripts/interface/SBQueue.i Mon Mar 11 06:58:46 2019
@@ -20,6 +20,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBQueueItem.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBQueueItem.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBQueueItem.i (original)
+++ lldb/trunk/scripts/interface/SBQueueItem.i Mon Mar 11 06:58:46 2019
@@ -20,6 +20,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBSection.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBSection.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBSection.i (original)
+++ lldb/trunk/scripts/interface/SBSection.i Mon Mar 11 06:58:46 2019
@@ -49,6 +49,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     const char *
     GetName ();
 

Modified: lldb/trunk/scripts/interface/SBStream.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBStream.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBStream.i (original)
+++ lldb/trunk/scripts/interface/SBStream.i Mon Mar 11 06:58:46 2019
@@ -48,6 +48,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     %feature("docstring", "
     //--------------------------------------------------------------------------
     /// If this stream is not redirected to a file, it will maintain a local

Modified: lldb/trunk/scripts/interface/SBStringList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBStringList.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBStringList.i (original)
+++ lldb/trunk/scripts/interface/SBStringList.i Mon Mar 11 06:58:46 2019
@@ -21,6 +21,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     AppendString (const char *str);
 

Modified: lldb/trunk/scripts/interface/SBStructuredData.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBStructuredData.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBStructuredData.i (original)
+++ lldb/trunk/scripts/interface/SBStructuredData.i Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ namespace lldb {
         bool
         IsValid() const;
 
+        explicit operator bool() const;
+
         void
         Clear();
 

Modified: lldb/trunk/scripts/interface/SBSymbol.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBSymbol.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBSymbol.i (original)
+++ lldb/trunk/scripts/interface/SBSymbol.i Mon Mar 11 06:58:46 2019
@@ -27,6 +27,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
 
     const char *
     GetName() const;

Modified: lldb/trunk/scripts/interface/SBSymbolContext.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBSymbolContext.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBSymbolContext.i (original)
+++ lldb/trunk/scripts/interface/SBSymbolContext.i Mon Mar 11 06:58:46 2019
@@ -57,6 +57,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     lldb::SBModule        GetModule ();
     lldb::SBCompileUnit   GetCompileUnit ();
     lldb::SBFunction      GetFunction ();

Modified: lldb/trunk/scripts/interface/SBSymbolContextList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBSymbolContextList.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBSymbolContextList.i (original)
+++ lldb/trunk/scripts/interface/SBSymbolContextList.i Mon Mar 11 06:58:46 2019
@@ -41,6 +41,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     uint32_t
     GetSize() const;
 

Modified: lldb/trunk/scripts/interface/SBTarget.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTarget.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTarget.i (original)
+++ lldb/trunk/scripts/interface/SBTarget.i Mon Mar 11 06:58:46 2019
@@ -80,6 +80,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     static bool
     EventIsTargetEvent (const lldb::SBEvent &event);
 

Modified: lldb/trunk/scripts/interface/SBThread.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBThread.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBThread.i (original)
+++ lldb/trunk/scripts/interface/SBThread.i Mon Mar 11 06:58:46 2019
@@ -74,6 +74,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 

Modified: lldb/trunk/scripts/interface/SBThreadCollection.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBThreadCollection.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBThreadCollection.i (original)
+++ lldb/trunk/scripts/interface/SBThreadCollection.i Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
     
     bool
     IsValid () const;
+
+    explicit operator bool() const;
     
     size_t
     GetSize ();

Modified: lldb/trunk/scripts/interface/SBThreadPlan.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBThreadPlan.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBThreadPlan.i (original)
+++ lldb/trunk/scripts/interface/SBThreadPlan.i Mon Mar 11 06:58:46 2019
@@ -40,6 +40,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     void
     Clear ();
 
@@ -90,6 +92,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     // This section allows an SBThreadPlan to push another of the common types of plans...
     SBThreadPlan
     QueueThreadPlanForStepOverRange (SBAddress &start_address,

Modified: lldb/trunk/scripts/interface/SBTrace.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTrace.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTrace.i (original)
+++ lldb/trunk/scripts/interface/SBTrace.i Mon Mar 11 06:58:46 2019
@@ -27,6 +27,8 @@ public:
 
   lldb::user_id_t GetTraceUID();
 
+  explicit operator bool() const;
+
   bool IsValid();
 
 };

Modified: lldb/trunk/scripts/interface/SBTraceOptions.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTraceOptions.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTraceOptions.i (original)
+++ lldb/trunk/scripts/interface/SBTraceOptions.i Mon Mar 11 06:58:46 2019
@@ -32,6 +32,8 @@ public:
 
   lldb::tid_t getThreadID();
 
+  explicit operator bool() const;
+
   bool IsValid();
 };
 }

Modified: lldb/trunk/scripts/interface/SBType.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBType.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBType.i (original)
+++ lldb/trunk/scripts/interface/SBType.i Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     const char *
     GetName ();
     
@@ -78,6 +80,8 @@ public:
     
     bool
     IsValid() const;
+
+    explicit operator bool() const;
     
     const char *
     GetName ();
@@ -196,6 +200,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     uint64_t
     GetByteSize();
 
@@ -487,6 +493,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     void
     Append (lldb::SBType type);
 

Modified: lldb/trunk/scripts/interface/SBTypeCategory.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeCategory.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeCategory.i (original)
+++ lldb/trunk/scripts/interface/SBTypeCategory.i Mon Mar 11 06:58:46 2019
@@ -24,6 +24,8 @@ namespace lldb {
         
         bool
         IsValid() const;
+
+        explicit operator bool() const;
         
         bool
         GetEnabled ();

Modified: lldb/trunk/scripts/interface/SBTypeEnumMember.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeEnumMember.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeEnumMember.i (original)
+++ lldb/trunk/scripts/interface/SBTypeEnumMember.i Mon Mar 11 06:58:46 2019
@@ -25,6 +25,8 @@ public:
     bool
     IsValid() const;
 
+    explicit operator bool() const;
+
     int64_t
     GetValueAsSigned();
 
@@ -90,6 +92,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     void
     Append (SBTypeEnumMember entry);
 

Modified: lldb/trunk/scripts/interface/SBTypeFilter.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeFilter.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeFilter.i (original)
+++ lldb/trunk/scripts/interface/SBTypeFilter.i Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ namespace lldb {
         
         bool
         IsValid() const;
+
+        explicit operator bool() const;
         
         bool
         IsEqualTo (lldb::SBTypeFilter &rhs);

Modified: lldb/trunk/scripts/interface/SBTypeFormat.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeFormat.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeFormat.i (original)
+++ lldb/trunk/scripts/interface/SBTypeFormat.i Mon Mar 11 06:58:46 2019
@@ -28,6 +28,8 @@ namespace lldb {
         
         bool
         IsValid() const;
+
+        explicit operator bool() const;
         
         bool
         IsEqualTo (lldb::SBTypeFormat &rhs);

Modified: lldb/trunk/scripts/interface/SBTypeNameSpecifier.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeNameSpecifier.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeNameSpecifier.i (original)
+++ lldb/trunk/scripts/interface/SBTypeNameSpecifier.i Mon Mar 11 06:58:46 2019
@@ -29,6 +29,8 @@ namespace lldb {
         
         bool
         IsValid() const;
+
+        explicit operator bool() const;
         
         bool
         IsEqualTo (lldb::SBTypeNameSpecifier &rhs);

Modified: lldb/trunk/scripts/interface/SBTypeSummary.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeSummary.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeSummary.i (original)
+++ lldb/trunk/scripts/interface/SBTypeSummary.i Mon Mar 11 06:58:46 2019
@@ -18,6 +18,8 @@ namespace lldb {
         
         bool
         IsValid ();
+
+        explicit operator bool() const;
         
         lldb::LanguageType
         GetLanguage ();
@@ -57,6 +59,8 @@ namespace lldb {
         
         bool
         IsValid() const;
+
+        explicit operator bool() const;
         
         bool
         IsEqualTo (lldb::SBTypeSummary &rhs);

Modified: lldb/trunk/scripts/interface/SBTypeSynthetic.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBTypeSynthetic.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBTypeSynthetic.i (original)
+++ lldb/trunk/scripts/interface/SBTypeSynthetic.i Mon Mar 11 06:58:46 2019
@@ -30,6 +30,8 @@ namespace lldb {
         
         bool
         IsValid() const;
+
+        explicit operator bool() const;
         
         bool
         IsEqualTo (lldb::SBTypeSynthetic &rhs);

Modified: lldb/trunk/scripts/interface/SBUnixSignals.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBUnixSignals.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBUnixSignals.i (original)
+++ lldb/trunk/scripts/interface/SBUnixSignals.i Mon Mar 11 06:58:46 2019
@@ -26,6 +26,8 @@ public:
     bool
     IsValid () const;
 
+    explicit operator bool() const;
+
     const char *
     GetSignalAsCString (int32_t signo) const;
 

Modified: lldb/trunk/scripts/interface/SBValue.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBValue.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBValue.i (original)
+++ lldb/trunk/scripts/interface/SBValue.i Mon Mar 11 06:58:46 2019
@@ -65,6 +65,8 @@ public:
 
     bool
     IsValid();
+
+    explicit operator bool() const;
     
     void
     Clear();

Modified: lldb/trunk/scripts/interface/SBValueList.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBValueList.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBValueList.i (original)
+++ lldb/trunk/scripts/interface/SBValueList.i Mon Mar 11 06:58:46 2019
@@ -77,6 +77,8 @@ public:
 
     bool
     IsValid() const;
+
+    explicit operator bool() const;
     
     void 
     Clear();

Modified: lldb/trunk/scripts/interface/SBVariablesOptions.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBVariablesOptions.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBVariablesOptions.i (original)
+++ lldb/trunk/scripts/interface/SBVariablesOptions.i Mon Mar 11 06:58:46 2019
@@ -19,6 +19,8 @@ public:
     
     bool
     IsValid () const;
+
+    explicit operator bool() const;
     
     bool
     GetIncludeArguments ()  const;

Modified: lldb/trunk/scripts/interface/SBWatchpoint.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/interface/SBWatchpoint.i?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/interface/SBWatchpoint.i (original)
+++ lldb/trunk/scripts/interface/SBWatchpoint.i Mon Mar 11 06:58:46 2019
@@ -30,6 +30,8 @@ public:
     bool
     IsValid();
 
+    explicit operator bool() const;
+
     SBError
     GetError();
 

Modified: lldb/trunk/scripts/lldb.swig
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/lldb.swig?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/scripts/lldb.swig (original)
+++ lldb/trunk/scripts/lldb.swig Mon Mar 11 06:58:46 2019
@@ -95,9 +95,8 @@ def lldb_iter(obj, getsize, getelem):
 # ==============================================================================
 # The modify-python-lldb.py script is responsible for post-processing this SWIG-
 # generated lldb.py module.  It is responsible for adding support for: iteration
-# protocol: __iter__, rich comparison methods: __eq__ and __ne__, truth value
-# testing (and built-in operation bool()): __nonzero__, and built-in function
-# len(): __len__.
+# protocol: __iter__, rich comparison methods: __eq__ and __ne__, and built-in
+# function len(): __len__.
 # ==============================================================================
 %}
 

Modified: lldb/trunk/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAddress.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAddress.cpp (original)
+++ lldb/trunk/source/API/SBAddress.cpp Mon Mar 11 06:58:46 2019
@@ -71,6 +71,10 @@ bool lldb::operator==(const SBAddress &l
 
 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();
 }

Modified: lldb/trunk/source/API/SBBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBlock.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBlock.cpp (original)
+++ lldb/trunk/source/API/SBBlock.cpp Mon Mar 11 06:58:46 2019
@@ -48,6 +48,10 @@ SBBlock::~SBBlock() { m_opaque_ptr = NUL
 
 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;
 }

Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Mon Mar 11 06:58:46 2019
@@ -92,6 +92,10 @@ break_id_t SBBreakpoint::GetID() const {
 
 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)

Modified: lldb/trunk/source/API/SBBreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointLocation.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointLocation.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointLocation.cpp Mon Mar 11 06:58:46 2019
@@ -65,6 +65,10 @@ BreakpointLocationSP SBBreakpointLocatio
 
 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());
 }

Modified: lldb/trunk/source/API/SBBreakpointName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointName.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointName.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointName.cpp Mon Mar 11 06:58:46 2019
@@ -190,6 +190,10 @@ bool SBBreakpointName::operator!=(const
 
 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;

Modified: lldb/trunk/source/API/SBBroadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBroadcaster.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBroadcaster.cpp (original)
+++ lldb/trunk/source/API/SBBroadcaster.cpp Mon Mar 11 06:58:46 2019
@@ -139,6 +139,10 @@ void SBBroadcaster::reset(Broadcaster *b
 
 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;
 }

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Mon Mar 11 06:58:46 2019
@@ -201,6 +201,10 @@ operator=(const SBCommandInterpreter &rh
 
 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 @@ SBCommand::SBCommand(lldb::CommandObject
 
 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;
 }

Modified: lldb/trunk/source/API/SBCommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandReturnObject.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandReturnObject.cpp (original)
+++ lldb/trunk/source/API/SBCommandReturnObject.cpp Mon Mar 11 06:58:46 2019
@@ -60,6 +60,10 @@ operator=(const SBCommandReturnObject &r
 
 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;
 }

Modified: lldb/trunk/source/API/SBCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommunication.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommunication.cpp (original)
+++ lldb/trunk/source/API/SBCommunication.cpp Mon Mar 11 06:58:46 2019
@@ -34,6 +34,10 @@ SBCommunication::~SBCommunication() {
 
 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;
 }

Modified: lldb/trunk/source/API/SBCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCompileUnit.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCompileUnit.cpp (original)
+++ lldb/trunk/source/API/SBCompileUnit.cpp Mon Mar 11 06:58:46 2019
@@ -188,6 +188,10 @@ lldb::LanguageType SBCompileUnit::GetLan
 
 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;
 }

Modified: lldb/trunk/source/API/SBData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBData.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBData.cpp (original)
+++ lldb/trunk/source/API/SBData.cpp Mon Mar 11 06:58:46 2019
@@ -59,6 +59,10 @@ const lldb::DataExtractorSP &SBData::ope
 
 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;
 }

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Mon Mar 11 06:58:46 2019
@@ -294,6 +294,10 @@ void SBDebugger::MemoryPressureDetected(
 
 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;
 }

Modified: lldb/trunk/source/API/SBDeclaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDeclaration.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDeclaration.cpp (original)
+++ lldb/trunk/source/API/SBDeclaration.cpp Mon Mar 11 06:58:46 2019
@@ -54,6 +54,10 @@ SBDeclaration::~SBDeclaration() {}
 
 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();
 }

Modified: lldb/trunk/source/API/SBError.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBError.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBError.cpp (original)
+++ lldb/trunk/source/API/SBError.cpp Mon Mar 11 06:58:46 2019
@@ -139,6 +139,10 @@ int SBError::SetErrorStringWithFormat(co
 
 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;
 }

Modified: lldb/trunk/source/API/SBEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBEvent.cpp (original)
+++ lldb/trunk/source/API/SBEvent.cpp Mon Mar 11 06:58:46 2019
@@ -161,6 +161,10 @@ void SBEvent::reset(Event *event_ptr) {
 
 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()....

Modified: lldb/trunk/source/API/SBFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpec.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFileSpec.cpp (original)
+++ lldb/trunk/source/API/SBFileSpec.cpp Mon Mar 11 06:58:46 2019
@@ -64,6 +64,10 @@ const SBFileSpec &SBFileSpec::operator=(
 
 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();
 }

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Mon Mar 11 06:58:46 2019
@@ -91,6 +91,10 @@ void SBFrame::SetFrameSP(const StackFram
 
 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);

Modified: lldb/trunk/source/API/SBFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFunction.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFunction.cpp (original)
+++ lldb/trunk/source/API/SBFunction.cpp Mon Mar 11 06:58:46 2019
@@ -46,6 +46,10 @@ SBFunction::~SBFunction() { m_opaque_ptr
 
 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;
 }

Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Mon Mar 11 06:58:46 2019
@@ -94,6 +94,10 @@ SBInstruction::~SBInstruction() {}
 
 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();
 }

Modified: lldb/trunk/source/API/SBInstructionList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstructionList.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstructionList.cpp (original)
+++ lldb/trunk/source/API/SBInstructionList.cpp Mon Mar 11 06:58:46 2019
@@ -44,6 +44,10 @@ SBInstructionList::~SBInstructionList()
 
 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;
 }

Modified: lldb/trunk/source/API/SBLineEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBLineEntry.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBLineEntry.cpp (original)
+++ lldb/trunk/source/API/SBLineEntry.cpp Mon Mar 11 06:58:46 2019
@@ -74,6 +74,10 @@ SBAddress SBLineEntry::GetEndAddress() c
 
 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();
 }

Modified: lldb/trunk/source/API/SBListener.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBListener.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBListener.cpp (original)
+++ lldb/trunk/source/API/SBListener.cpp Mon Mar 11 06:58:46 2019
@@ -52,6 +52,10 @@ SBListener::~SBListener() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Mon Mar 11 06:58:46 2019
@@ -80,6 +80,10 @@ SBModule::~SBModule() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBModuleSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModuleSpec.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModuleSpec.cpp (original)
+++ lldb/trunk/source/API/SBModuleSpec.cpp Mon Mar 11 06:58:46 2019
@@ -42,6 +42,10 @@ SBModuleSpec::~SBModuleSpec() {}
 
 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();
 }

Modified: lldb/trunk/source/API/SBPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBPlatform.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBPlatform.cpp (original)
+++ lldb/trunk/source/API/SBPlatform.cpp Mon Mar 11 06:58:46 2019
@@ -287,6 +287,10 @@ SBPlatform::~SBPlatform() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Mon Mar 11 06:58:46 2019
@@ -119,6 +119,10 @@ void SBProcess::Clear() {
 
 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());

Modified: lldb/trunk/source/API/SBProcessInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcessInfo.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcessInfo.cpp (original)
+++ lldb/trunk/source/API/SBProcessInfo.cpp Mon Mar 11 06:58:46 2019
@@ -50,6 +50,10 @@ void SBProcessInfo::SetProcessInfo(const
 
 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;
 }

Modified: lldb/trunk/source/API/SBQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueue.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueue.cpp (original)
+++ lldb/trunk/source/API/SBQueue.cpp Mon Mar 11 06:58:46 2019
@@ -247,6 +247,10 @@ SBQueue::~SBQueue() {}
 
 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();
 }

Modified: lldb/trunk/source/API/SBQueueItem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueueItem.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueueItem.cpp (original)
+++ lldb/trunk/source/API/SBQueueItem.cpp Mon Mar 11 06:58:46 2019
@@ -40,6 +40,10 @@ SBQueueItem::~SBQueueItem() { m_queue_it
 
 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;
 }

Modified: lldb/trunk/source/API/SBReproducer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBReproducer.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBReproducer.cpp (original)
+++ lldb/trunk/source/API/SBReproducer.cpp Mon Mar 11 06:58:46 2019
@@ -62,6 +62,7 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
                          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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
                           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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
                          (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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
                                 (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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
                          (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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
                                ());
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
   {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
                          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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
                          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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
                                 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 @@ SBRegistry::SBRegistry() {
                                 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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
     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 @@ SBRegistry::SBRegistry() {
         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 @@ SBRegistry::SBRegistry() {
                          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, ());

Modified: lldb/trunk/source/API/SBSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSection.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSection.cpp (original)
+++ lldb/trunk/source/API/SBSection.cpp Mon Mar 11 06:58:46 2019
@@ -48,6 +48,10 @@ SBSection::~SBSection() {}
 
 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;

Modified: lldb/trunk/source/API/SBStream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBStream.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBStream.cpp (original)
+++ lldb/trunk/source/API/SBStream.cpp Mon Mar 11 06:58:46 2019
@@ -29,6 +29,10 @@ SBStream::~SBStream() {}
 
 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);
 }

Modified: lldb/trunk/source/API/SBStringList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBStringList.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBStringList.cpp (original)
+++ lldb/trunk/source/API/SBStringList.cpp Mon Mar 11 06:58:46 2019
@@ -51,6 +51,10 @@ const lldb_private::StringList &SBString
 
 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);
 }

Modified: lldb/trunk/source/API/SBStructuredData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBStructuredData.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBStructuredData.cpp (original)
+++ lldb/trunk/source/API/SBStructuredData.cpp Mon Mar 11 06:58:46 2019
@@ -74,6 +74,10 @@ lldb::SBError SBStructuredData::SetFromJ
 
 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();
 }

Modified: lldb/trunk/source/API/SBSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbol.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbol.cpp (original)
+++ lldb/trunk/source/API/SBSymbol.cpp Mon Mar 11 06:58:46 2019
@@ -45,6 +45,10 @@ void SBSymbol::SetSymbol(lldb_private::S
 
 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;
 }

Modified: lldb/trunk/source/API/SBSymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbolContext.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbolContext.cpp (original)
+++ lldb/trunk/source/API/SBSymbolContext.cpp Mon Mar 11 06:58:46 2019
@@ -58,6 +58,10 @@ void SBSymbolContext::SetSymbolContext(c
 
 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;
 }

Modified: lldb/trunk/source/API/SBSymbolContextList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbolContextList.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbolContextList.cpp (original)
+++ lldb/trunk/source/API/SBSymbolContextList.cpp Mon Mar 11 06:58:46 2019
@@ -88,6 +88,10 @@ void SBSymbolContextList::Append(SBSymbo
 
 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;
 }

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Mar 11 06:58:46 2019
@@ -170,6 +170,10 @@ const char *SBTarget::GetBroadcasterClas
 
 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();
 }

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Mon Mar 11 06:58:46 2019
@@ -115,6 +115,10 @@ lldb::SBQueue SBThread::GetQueue() const
 
 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);

Modified: lldb/trunk/source/API/SBThreadCollection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThreadCollection.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThreadCollection.cpp (original)
+++ lldb/trunk/source/API/SBThreadCollection.cpp Mon Mar 11 06:58:46 2019
@@ -62,6 +62,10 @@ const lldb::ThreadCollectionSP &SBThread
 
 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;
 }

Modified: lldb/trunk/source/API/SBThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThreadPlan.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThreadPlan.cpp (original)
+++ lldb/trunk/source/API/SBThreadPlan.cpp Mon Mar 11 06:58:46 2019
@@ -97,6 +97,10 @@ lldb_private::ThreadPlan *SBThreadPlan::
 
 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;
 }

Modified: lldb/trunk/source/API/SBTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTrace.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTrace.cpp (original)
+++ lldb/trunk/source/API/SBTrace.cpp Mon Mar 11 06:58:46 2019
@@ -116,6 +116,10 @@ void SBTrace::SetSP(const ProcessSP &pro
 
 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;

Modified: lldb/trunk/source/API/SBTraceOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTraceOptions.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTraceOptions.cpp (original)
+++ lldb/trunk/source/API/SBTraceOptions.cpp Mon Mar 11 06:58:46 2019
@@ -104,6 +104,10 @@ void SBTraceOptions::setMetaDataBufferSi
 
 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;

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Mon Mar 11 06:58:46 2019
@@ -107,6 +107,10 @@ const TypeImpl &SBType::ref() const {
 
 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 @@ SBTypeList::SBTypeList(const SBTypeList
 
 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 @@ lldb::SBTypeMember &SBTypeMember::operat
 
 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 @@ operator=(const lldb::SBTypeMemberFuncti
 
 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();
 }

Modified: lldb/trunk/source/API/SBTypeCategory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeCategory.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeCategory.cpp (original)
+++ lldb/trunk/source/API/SBTypeCategory.cpp Mon Mar 11 06:58:46 2019
@@ -44,6 +44,10 @@ SBTypeCategory::~SBTypeCategory() {}
 
 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);
 }

Modified: lldb/trunk/source/API/SBTypeEnumMember.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeEnumMember.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeEnumMember.cpp (original)
+++ lldb/trunk/source/API/SBTypeEnumMember.cpp Mon Mar 11 06:58:46 2019
@@ -50,6 +50,10 @@ SBTypeEnumMember &SBTypeEnumMember::oper
 
 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 @@ SBTypeEnumMemberList::SBTypeEnumMemberLi
 
 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);
 }

Modified: lldb/trunk/source/API/SBTypeFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeFilter.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeFilter.cpp (original)
+++ lldb/trunk/source/API/SBTypeFilter.cpp Mon Mar 11 06:58:46 2019
@@ -35,6 +35,10 @@ SBTypeFilter::~SBTypeFilter() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBTypeFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeFormat.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeFormat.cpp (original)
+++ lldb/trunk/source/API/SBTypeFormat.cpp Mon Mar 11 06:58:46 2019
@@ -44,6 +44,10 @@ SBTypeFormat::~SBTypeFormat() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBTypeNameSpecifier.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeNameSpecifier.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeNameSpecifier.cpp (original)
+++ lldb/trunk/source/API/SBTypeNameSpecifier.cpp Mon Mar 11 06:58:46 2019
@@ -49,6 +49,10 @@ SBTypeNameSpecifier::~SBTypeNameSpecifie
 
 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;
 }

Modified: lldb/trunk/source/API/SBTypeSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSummary.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeSummary.cpp (original)
+++ lldb/trunk/source/API/SBTypeSummary.cpp Mon Mar 11 06:58:46 2019
@@ -37,6 +37,10 @@ SBTypeSummaryOptions::~SBTypeSummaryOpti
 
 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 @@ SBTypeSummary::~SBTypeSummary() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBTypeSynthetic.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeSynthetic.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeSynthetic.cpp (original)
+++ lldb/trunk/source/API/SBTypeSynthetic.cpp Mon Mar 11 06:58:46 2019
@@ -57,6 +57,10 @@ SBTypeSynthetic::~SBTypeSynthetic() {}
 
 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;
 }

Modified: lldb/trunk/source/API/SBUnixSignals.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBUnixSignals.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBUnixSignals.cpp (original)
+++ lldb/trunk/source/API/SBUnixSignals.cpp Mon Mar 11 06:58:46 2019
@@ -59,6 +59,10 @@ void SBUnixSignals::Clear() {
 
 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());
 }

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Mon Mar 11 06:58:46 2019
@@ -243,6 +243,10 @@ SBValue::~SBValue() {}
 
 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

Modified: lldb/trunk/source/API/SBValueList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValueList.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValueList.cpp (original)
+++ lldb/trunk/source/API/SBValueList.cpp Mon Mar 11 06:58:46 2019
@@ -87,6 +87,10 @@ SBValueList::~SBValueList() {}
 
 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);
 }

Modified: lldb/trunk/source/API/SBVariablesOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBVariablesOptions.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBVariablesOptions.cpp (original)
+++ lldb/trunk/source/API/SBVariablesOptions.cpp Mon Mar 11 06:58:46 2019
@@ -106,6 +106,10 @@ SBVariablesOptions::~SBVariablesOptions(
 
 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;
 }

Modified: lldb/trunk/source/API/SBWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBWatchpoint.cpp?rev=355824&r1=355823&r2=355824&view=diff
==============================================================================
--- lldb/trunk/source/API/SBWatchpoint.cpp (original)
+++ lldb/trunk/source/API/SBWatchpoint.cpp Mon Mar 11 06:58:46 2019
@@ -62,6 +62,10 @@ watch_id_t SBWatchpoint::GetID() {
 
 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());
 }




More information about the lldb-commits mailing list