summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-20 22:30:48 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-20 22:30:48 +0000
commitdd68ab83b9610b4be5ac5c6ba4a5b2711a3d9633 (patch)
treec0bf97c61d4039ecb2da851eedfad58d205be359 /lldb/source/API
parentb3aaf95c4f575ac762449d696251424dd4972474 (diff)
downloadbcm5719-llvm-dd68ab83b9610b4be5ac5c6ba4a5b2711a3d9633.tar.gz
bcm5719-llvm-dd68ab83b9610b4be5ac5c6ba4a5b2711a3d9633.zip
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
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBCommunication.cpp6
-rw-r--r--lldb/source/API/SBInstructionList.cpp6
2 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/API/SBCommunication.cpp b/lldb/source/API/SBCommunication.cpp
index 160640683d1..6b5ddb37cd6 100644
--- a/lldb/source/API/SBCommunication.cpp
+++ b/lldb/source/API/SBCommunication.cpp
@@ -44,6 +44,12 @@ SBCommunication::~SBCommunication()
}
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 c6fe572e22f..6420dfc41ff 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -40,6 +40,12 @@ SBInstructionList::~SBInstructionList ()
{
}
+bool
+SBInstructionList::IsValid () const
+{
+ return m_opaque_sp.get() != NULL;
+}
+
size_t
SBInstructionList::GetSize ()
{
OpenPOWER on IntegriCloud