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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to