[Lldb-commits] [lldb] [lldb] Fix inconsistencies in DWARFExpression errors (PR #94554)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 5 19:46:10 PDT 2024


================
@@ -1657,7 +1650,7 @@ llvm::Expected<Value> DWARFExpression::Evaluate(
     case DW_OP_eq:
       if (stack.size() < 2) {
         return llvm::createStringError(
-            "Expression stack needs at least 2 items for DW_OP_eq.");
+            "expression stack needs at least 2 items for DW_OP_eq");
----------------
adrian-prantl wrote:

The obvious next step to refactor will be to hoist the arity check of the operators into a single helper that uses a table and a %s in the error message :-)

https://github.com/llvm/llvm-project/pull/94554


More information about the lldb-commits mailing list