[lldb] [llvm] [lldb] Use llvm::DWARFExpression::iterator in DWARFExpression::Evaluate (PR #190556)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 01:51:54 PDT 2026
================
@@ -1231,36 +1227,36 @@ llvm::Expected<Value> DWARFExpression::Evaluate(
// DW_OP_constu unsigned LEB128 integer constant
// DW_OP_consts signed LEB128 integer constant
case DW_OP_const1u:
- stack.push_back(to_generic(opcodes.GetU8(&offset)));
+ stack.push_back(to_generic(op->getRawOperand(0)));
break;
case DW_OP_const1s:
- stack.push_back(to_generic((int8_t)opcodes.GetU8(&offset)));
+ stack.push_back(to_generic((int8_t)op->getRawOperand(0)));
break;
case DW_OP_const2u:
- stack.push_back(to_generic(opcodes.GetU16(&offset)));
+ stack.push_back(to_generic(op->getRawOperand(0)));
break;
case DW_OP_const2s:
- stack.push_back(to_generic((int16_t)opcodes.GetU16(&offset)));
+ stack.push_back(to_generic((int16_t)op->getRawOperand(0)));
break;
case DW_OP_const4u:
- stack.push_back(to_generic(opcodes.GetU32(&offset)));
+ stack.push_back(to_generic(op->getRawOperand(0)));
break;
case DW_OP_const4s:
- stack.push_back(to_generic((int32_t)opcodes.GetU32(&offset)));
+ stack.push_back(to_generic((int32_t)op->getRawOperand(0)));
break;
case DW_OP_const8u:
- stack.push_back(to_generic(opcodes.GetU64(&offset)));
+ stack.push_back(to_generic(op->getRawOperand(0)));
break;
case DW_OP_const8s:
- stack.push_back(to_generic((int64_t)opcodes.GetU64(&offset)));
+ stack.push_back(to_generic((int64_t)op->getRawOperand(0)));
break;
// These should also use to_generic, but we can't do that due to a
// producer-side bug in llvm. See llvm.org/pr48087.
case DW_OP_constu:
- stack.push_back(Scalar(opcodes.GetULEB128(&offset)));
+ stack.push_back(Scalar(op->getRawOperand(0)));
break;
case DW_OP_consts:
- stack.push_back(Scalar(opcodes.GetSLEB128(&offset)));
+ stack.push_back(Scalar(op->getRawOperand(0)));
----------------
s-barannikov wrote:
I don't think the sign matters here, but I added a cast anyway just in case.
https://github.com/llvm/llvm-project/pull/190556
More information about the llvm-commits
mailing list