summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/RegularExpression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/RegularExpression.cpp')
-rw-r--r--lldb/source/Core/RegularExpression.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Core/RegularExpression.cpp b/lldb/source/Core/RegularExpression.cpp
index b632c2eb0b0..45ed9cc6374 100644
--- a/lldb/source/Core/RegularExpression.cpp
+++ b/lldb/source/Core/RegularExpression.cpp
@@ -153,3 +153,18 @@ RegularExpression::Free()
m_comp_err = 1;
}
}
+
+size_t
+RegularExpression::GetErrorAsCString (char *err_str, size_t err_str_max_len) const
+{
+ if (m_comp_err == 0)
+ {
+ if (err_str && err_str_max_len)
+ *err_str = '\0';
+ return 0;
+ }
+
+ return ::regerror (m_comp_err, &m_preg, err_str, err_str_max_len);
+}
+
+
OpenPOWER on IntegriCloud