Test lldb Python API object's default constructor and make sure it is invalid
after initial construction.

There are two exceptions to the above general rules, though; the API objects are
SBCommadnReturnObject and SBStream.

llvm-svn: 133475
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index 1606406..6b5ddb3 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -44,6 +44,12 @@
 }
 
 bool
+SBCommunication::IsValid () const
+{
+    return m_opaque != NULL;
+}
+
+bool
 SBCommunication::GetCloseOnEOF ()
 {
     if (m_opaque)
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index c6fe572..6420dfc 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -40,6 +40,12 @@
 {
 }
 
+bool
+SBInstructionList::IsValid () const
+{
+    return m_opaque_sp.get() != NULL;
+}
+
 size_t
 SBInstructionList::GetSize ()
 {