DavidSpickett wrote:

> So instead of using enum for the field why not a union of enum and unsigned.

The union idea sort of works, but it's clunky enough I'm not going to pursue 
it. The most verbose version:
```
    fpcr = 0x00000000
         = {
<...>
             RMode = (meaning = RN, value = 0)
```
Then you can set a decl printing helper and match on the generated type names 
to remove
some of it:
```
    fpcr = 0x00000000
         = {
<...>
             RMode = {
                RN
               RMode = 0
             }
```
With a typedef I could remove the final "RMode", right now it's "unsigned 
int:2" so the
helper doesn't kick in.

Seems to force vertical layout, and the two values will always be on separate 
lines.
This looks awkward enough that I'd rather just keep the existing format.

Now I'll see if I can use the existing dump code for all but the enums, as you 
suggested.

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

Reply via email to