[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 26 02:24:46 PDT 2025
https://github.com/labath commented:
> * Based on the way DiagnosticError is use, I've created a new error class, DILDiagnosticError, patterned after the OptionParserError clas, which DOES make use of DiagnosticError.
The class implementation looks okay for the most part.
> * I have not been able to discover any way of converting DILDiagnosticError or DiagnosticDetail into an llvm::Error at all.
You construct these via `llvm::make_error`, see inline suggestions.
> * The only way I could find to convert a DILDiagnosticError into an LLDB::Status, was to extract the DiagnosticDetail message and create the LLDB::Status around that.
That shouldn't be necessary given that I'd like to work with llvm::Errors primarily (see other inline comment). At the API boundary (where this error goes outside of the DIL implementation, it can be converted to a Status using `Status::FromError`.
>
> * We currently still have to leave the errors as LLDB::Status errors, because the calls into & out of GetVariableValueForExpressionPath have no way (at the moment) of handling structured errors (i.e. DiagnosticDetails or DILDiagnosticErrors). We should probably change that in the future, but I would prefer to do that in a different PR.
Definitely.
https://github.com/llvm/llvm-project/pull/120971
More information about the lldb-commits
mailing list