summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBCommandReturnObject.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-08-19 23:06:38 +0000
committerGreg Clayton <gclayton@apple.com>2011-08-19 23:06:38 +0000
commit7d47a66379ba8800b34f601c4bdd0606f1623bf2 (patch)
tree70eaa3fd6b7d5bbf3c3ff1f44a7c561e4954e6cc /lldb/source/API/SBCommandReturnObject.cpp
parent419fd4f3150f0d5f6727627a32196a93c5502684 (diff)
downloadbcm5719-llvm-7d47a66379ba8800b34f601c4bdd0606f1623bf2.tar.gz
bcm5719-llvm-7d47a66379ba8800b34f601c4bdd0606f1623bf2.zip
Added the ability to create a SBCommandReturnObject object from a pointer
and also to later release the ownership of the pointer object. This was needed for SWIG interaction. llvm-svn: 138133
Diffstat (limited to 'lldb/source/API/SBCommandReturnObject.cpp')
-rw-r--r--lldb/source/API/SBCommandReturnObject.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index 8550b5d45c6..d17de941935 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -28,6 +28,17 @@ SBCommandReturnObject::SBCommandReturnObject (const SBCommandReturnObject &rhs):
m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
}
+SBCommandReturnObject::SBCommandReturnObject (CommandReturnObject *ptr) :
+ m_opaque_ap (ptr)
+{
+}
+
+CommandReturnObject *
+SBCommandReturnObject::Release ()
+{
+ return m_opaque_ap.release();
+}
+
const SBCommandReturnObject &
SBCommandReturnObject::operator = (const SBCommandReturnObject &rhs)
{
@@ -57,7 +68,7 @@ SBCommandReturnObject::IsValid() const
const char *
SBCommandReturnObject::GetOutput ()
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+ LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
@@ -77,7 +88,7 @@ SBCommandReturnObject::GetOutput ()
const char *
SBCommandReturnObject::GetError ()
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+ LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
OpenPOWER on IntegriCloud