[libc-commits] [libc] [llvm] [libc] Implement a Vector container (PR #243109)

Jeff Bailey via libc-commits libc-commits at lists.llvm.org
Tue Nov 17 04:09:54 PST 2026


kaladron wrote:

> My motivation has shifted a bit since we last spoke. Unit tests are not my main concern anymore. It's the specialized vector-like classes that are sprouting across the codebase. I think they're like at least five of them now, and LLMs will happily produce more of them. Cleaning them up is getting harder and harder, as each implementation has its own special quirk. I think that the current ones can be handled with only trivial types, so I've removed that part from this patch, though I think it's only a matter of time before we need someone like them. (Incidentally, I've just come across a use case for a non-trivial cpp::expected. It's not vector, but I'm going to send the patch to you to better understand how you're thinking.)

Essentially this.  I've twice put in and removed a Vector implementation of types because DNS, Regex, (etc) all need some kinda of growable container.  I'm not fussy about the interface.  I tend to default to the C++ STL because at least I know it.  But GPU definitely has constraints that I don't understand, and we also have the problem that in many cases we need to release the resulting array to a C-based caller.  POSIX is terrible for handing back malloc'd RAM. =(

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


More information about the libc-commits mailing list