[llvm-dev] RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.

Duncan P. N. Exon Smith via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 2 12:39:42 PST 2020



> On 2020 Dec  1, at 21:04, Chris Lattner <clattner at nondot.org> wrote:
> 
> 1) are you, or anyone else, interested in driving an llvm::Vector proposal + coding standard change to get us going in the right direction?  I don’t think we need a mass migration of the code base, just get the policy aligned right plus the new type name to exist.

I'll try to get a minimal patch together with docs and send an RFC later this week.

(
I think the initial patch could be as simple as:
```
template <class T> using Vector = SmallVector<T, 0>;
```
but maybe we'd want to rename `SmallVectorImpl` to `VectorImpl`, or maybe there are other ideas, but off topic for this thread...
)

> On 2020 Dec  2, at 09:51, James Y Knight <jyknight at google.com> wrote:
> 
> I strongly disagree here. Not wanting to bother to add 'noexcept' to user-defined move-constructors is a poor justification for switching to a different vector type. Perhaps there are other reasons which might justify avoiding std::vector, but not that...

I'll be sure to mention this alternative in the RFC for llvm::Vector; we can talk about it there; maybe you'll convince the rest of us to add the `noexcept`s everywhere and then the justification for llvm::Vector would indeed be weaker (not completely absent though)...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201202/20f02486/attachment.html>


More information about the llvm-dev mailing list