Second attempt at getting the PyCallable changes in trunk

Thanks to Daniel Malea for helping test this patch for Linux happiness!

llvm-svn: 185965
This commit is contained in:
Enrico Granata
2013-07-09 20:14:26 +00:00
parent 61a56d7a3a
commit eff81a471a
11 changed files with 1080 additions and 1427 deletions

View File

@@ -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);
}