[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
Mon May 25 07:16:48 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
I checked with UBSAN, this doesn't cause any issues, even if I remove the checks on the DIL side. I'm guessing there are guards agains UB in APInt itself as well.
There are already tests for both division by zero and large/negative shifts included.
https://github.com/llvm/llvm-project/pull/192506
More information about the lldb-commits
mailing list