https://github.com/Endilll commented:

Converting packed `unsigned Kind` into non-packed `SValKind Kind` is definitely 
going to help debuggers to display the value correctly.

But I have to point out that this patch doesn't address the fact that `const 
void* Data` is not friendly to debuggers, especially with type information 
encoded in another member. So even with this patch applied, someone would still 
have to write (and maintain) a custom formatter on debugger side to display 
`Data` correctly.

If you refactor `const void* Data` to be a `llvm::PointerUnion`, then it will 
be picked up automatically (`PointerUnion` is a popular type, so I've already 
written a formatter for it.) Together with removing `BaseBits` from `Kind` and 
making the latter non-packed, `SVal` will have a debugger-friendly layout.

That said, debugger-friendliness is probably not among top priorities, so I'm 
not going to block this patch, if this is the direction you and reviewers want 
to take.

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

Reply via email to