Michael137 wrote:

I haven't done an in-depth review of the patch yet but my first instinct here 
is that this looks like a lot of work for LLDB which the compiler has already 
done, so we ideally don't want to repeat. Where is this actually an issue from 
a user perspective? In the example you gave one could just cast to the 
appropriate enum type and get the bit-mask style presentation:
```
(lldb) expr (UnscopedEnum) (-enum_one)
(UnscopedEnum) $0 = One | 0xfffffffe
```
Not that this shouldn't be fixed, just weighing of the amount of complexity 
added here versus the benefit.

Also, is this promotion-type something that can be encoded in DWARF? GCC 
generates the same DWARF as Clang here. What happens if we make the type of the 
`DW_TAG_variable`s be `UnscopedEnum` instead of `int`? I guess that wouldn't 
help with
```
(lldb) expr UnscopedEnum::One + 1
```

https://github.com/llvm/llvm-project/pull/115005
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to