summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Error.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-05-05 02:26:40 +0000
committerJim Ingham <jingham@apple.com>2014-05-05 02:26:40 +0000
commit1624a2d3c8a9558840b5e17623d232c0aa3c01cd (patch)
treed11f0105a8cca2f3a4c887fbe278b570281ab367 /lldb/source/Core/Error.cpp
parente8a7afef86220229a872b78b5e3dd212574d741a (diff)
downloadbcm5719-llvm-1624a2d3c8a9558840b5e17623d232c0aa3c01cd.tar.gz
bcm5719-llvm-1624a2d3c8a9558840b5e17623d232c0aa3c01cd.zip
Make the Expression Execution result enum available to the SB API layer.
Add a callback that will allow an expression to be cancelled between the expression evaluation stages (for the ClangUserExpressions.) <rdar://problem/16790467>, <rdar://problem/16573440> llvm-svn: 207944
Diffstat (limited to 'lldb/source/Core/Error.cpp')
-rw-r--r--lldb/source/Core/Error.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/lldb/source/Core/Error.cpp b/lldb/source/Core/Error.cpp
index bbcf39d7438..8929568aa68 100644
--- a/lldb/source/Core/Error.cpp
+++ b/lldb/source/Core/Error.cpp
@@ -264,6 +264,35 @@ Error::SetMachError (uint32_t err)
m_string.clear();
}
+void
+Error::SetExpressionError (lldb::ExpressionResults result, const char *mssg)
+{
+ m_code = result;
+ m_type = eErrorTypeExpression;
+ m_string = mssg;
+}
+
+int
+Error::SetExpressionErrorWithFormat (lldb::ExpressionResults result, const char *format, ...)
+{
+ int length = 0;
+
+ if (format && format[0])
+ {
+ va_list args;
+ va_start (args, format);
+ length = SetErrorStringWithVarArg (format, args);
+ va_end (args);
+ }
+ else
+ {
+ m_string.clear();
+ }
+ m_code = result;
+ m_type = eErrorTypeExpression;
+ return length;
+}
+
//----------------------------------------------------------------------
// Set accesssor for the error value and type.
//----------------------------------------------------------------------
OpenPOWER on IntegriCloud