[Lldb-commits] [lldb] [lldb] Store expression evaluator diagnostics in an llvm::Error (NFC) (PR #106442)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 24 16:22:15 PDT 2024
================
@@ -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';
+ }
----------------
medismailben wrote:
It's not clear what this is trying to do. A comment would be nice here.
https://github.com/llvm/llvm-project/pull/106442
More information about the lldb-commits
mailing list