summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandReturnObject.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/Interpreter/CommandReturnObject.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/Interpreter/CommandReturnObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandReturnObject.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp
index 2b93a546f8a..9c63753a23f 100644
--- a/lldb/source/Interpreter/CommandReturnObject.cpp
+++ b/lldb/source/Interpreter/CommandReturnObject.cpp
@@ -143,9 +143,19 @@ CommandReturnObject::SetError (const Error &error, const char *fallback_error_cs
const char *error_cstr = error.AsCString();
if (error_cstr == NULL)
error_cstr = fallback_error_cstr;
- AppendError (error_cstr);
- SetStatus (eReturnStatusFailed);
+ SetError(error_cstr);
}
+
+void
+CommandReturnObject::SetError (const char *error_cstr)
+{
+ if (error_cstr)
+ {
+ AppendError (error_cstr);
+ SetStatus (eReturnStatusFailed);
+ }
+}
+
// Similar to AppendError, but do not prepend 'Error: ' to message, and
// don't append "\n" to the end of it.
OpenPOWER on IntegriCloud