================
@@ -224,6 +224,14 @@ const char *Status::AsCString(const char
*default_error_str) const {
if (!m_string.empty() && m_string[m_string.size() - 1] == '\n')
m_string.pop_back();
+ // FIXME: Workaround for ErrorList[ExpressionError, ...].
+ if (m_error.isA<llvm::ErrorList>()) {
+ while (!m_string.empty() && m_string[0] == '\n')
+ m_string = std::string(m_string.data() + 1, m_string.size() - 1);
+ if (!m_string.empty() && m_string[m_string.size() - 1] != '\n')
+ m_string += '\n';
+ }
----------------
adrian-prantl wrote:
That's what I had originally, I think I might have misunderstood an earlier
comment from you suggesting we represent the expression failure as ErrorInfo to
mean that you preferred having them be an ErrorList. I can definitely change
that back. It would make iterating over the details a tiny bit less cumbersome.
https://github.com/llvm/llvm-project/pull/106442
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits