[Lldb-commits] [lldb] [lldb] Add bitwise shift operators and fix literals' sign in DIL (PR #192506)
Ilia Kuklin via lldb-commits
lldb-commits at lists.llvm.org
Thu May 14 11:51:15 PDT 2026
================
@@ -615,6 +615,10 @@ Interpreter::EvaluateScalarOp(BinaryOpKind kind, lldb::ValueObjectSP lhs,
return value_object(l / r);
case BinaryOpKind::Rem:
return value_object(l % r);
+ case BinaryOpKind::Shl:
+ return value_object(l << r);
----------------
kuilpd wrote:
@adrian-prantl
Yes, we check the argument in the evaluating functions `EvaluateBinaryShift`, `EvaluateBinaryDivision` and `EvaluateBinaryRemainder`, which in turn call `EvaluateScalarOp`, which is just a function that forwars operators to the Scalar class. I will run tests with UBSAN as well to check this.
https://github.com/kuilpd/llvm-project/blob/847e3c13c16377b24127f31767caeb10e8e43dec/lldb/source/ValueObject/DILEval.cpp#L853-L856
https://github.com/llvm/llvm-project/pull/192506
More information about the lldb-commits
mailing list