[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 10 03:38:42 PST 2025


Michael137 wrote:

> @Michael137 Changed the first argument of `computeEnumBits` to an `ArrayRef` to avoid the template and so it can be still seamlessly used from Sema. On LLDB side, I had to create a `SmallVector` and put enum constants there at the point of their creation (`AddEnumerationValueToEnumerationType` returns a pointer anyway) so that it can be passed to `computeEnumBits` as is. It's only a vector of pointers, and it's discarded after, so if it's not a problem here, I'll make the same changes in the Sema PR.

I don't think they necessarily had an issue with the template. It'd be silly for us to pay for the cost of constructing an intermediate vector if we're in control of the API and could avoid the work altogether. I'll comment on the other PR but I'd rather not construct this temporary just so we can pass it as an `ArrayRef`

https://github.com/llvm/llvm-project/pull/115005


More information about the lldb-commits mailing list