[Lldb-commits] [lldb] [LLDB] Add unary plus and minus to DIL (PR #155617)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 8 14:49:42 PDT 2025
jimingham wrote:
Do we ever want to support - in the DIL - something like:
swift_integer = c_integer + rust_integer
We do know how to do that (variations on the details of integer promotion and the like aside) and given these are data objects we can query for their integer values it seems somewhat artificial to disallow it. But in that case, whose promotion rules should we use?
That's why I've been arguing that we should have a DIL set of promotion rules where integers are not sized. That way all these sort of computations can be done naturally. So I would argue that the DIL code should be its own plugin, not trying to either be C++ or something in the background, nor trying to figure out based on the expression what "Real" Typesystem we should dispatch to.
When people want to answer the question "what would this expression do at this point in my code" they should be using the expression evaluator for that language. The DIL is there to support the widest range of data introspection tasks we can offer on generic structured data objects.
https://github.com/llvm/llvm-project/pull/155617
More information about the lldb-commits
mailing list