summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBCommandReturnObject.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-07-09 20:14:26 +0000
committerEnrico Granata <egranata@apple.com>2013-07-09 20:14:26 +0000
commiteff81a471acdf888e3cf5bc6550bd62b465d4e06 (patch)
treedc00802f687af8148091b6a2441f142b3f0f690d /lldb/source/API/SBCommandReturnObject.cpp
parent61a56d7a3a7813f0961a522f1dc980bcf27fcfbb (diff)
downloadbcm5719-llvm-eff81a471acdf888e3cf5bc6550bd62b465d4e06.tar.gz
bcm5719-llvm-eff81a471acdf888e3cf5bc6550bd62b465d4e06.zip
Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness! llvm-svn: 185965
Diffstat (limited to 'lldb/source/API/SBCommandReturnObject.cpp')
-rw-r--r--lldb/source/API/SBCommandReturnObject.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/lldb/source/API/SBCommandReturnObject.cpp b/lldb/source/API/SBCommandReturnObject.cpp
index b0533e132db..83d65637d3f 100644
--- a/lldb/source/API/SBCommandReturnObject.cpp
+++ b/lldb/source/API/SBCommandReturnObject.cpp
@@ -8,8 +8,10 @@
//===----------------------------------------------------------------------===//
#include "lldb/API/SBCommandReturnObject.h"
+#include "lldb/API/SBError.h"
#include "lldb/API/SBStream.h"
+#include "lldb/Core/Error.h"
#include "lldb/Core/Log.h"
#include "lldb/Interpreter/CommandReturnObject.h"
@@ -329,3 +331,22 @@ SBCommandReturnObject::Printf(const char* format, ...)
return 0;
}
+void
+SBCommandReturnObject::SetError (lldb::SBError &error, const char *fallback_error_cstr)
+{
+ if (m_opaque_ap.get())
+ {
+ if (error.IsValid())
+ m_opaque_ap->SetError(error.ref(), fallback_error_cstr);
+ else if (fallback_error_cstr)
+ m_opaque_ap->SetError(Error(), fallback_error_cstr);
+ }
+}
+
+void
+SBCommandReturnObject::SetError (const char *error_cstr)
+{
+ if (m_opaque_ap.get() && error_cstr)
+ m_opaque_ap->SetError(error_cstr);
+}
+
OpenPOWER on IntegriCloud