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

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 2 21:35:44 PST 2020



> On Dec 2, 2020, at 12:39 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> 
> 
>> On 2020 Dec  1, at 21:04, Chris Lattner <clattner at nondot.org <mailto: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...
> )

Right, I think it is as simple as the using declaration, but also includes a revision to the coding standards and programmer manual dox.

I do think that renaming SmallVectorImpl to VectorImpl would make sense, that is something we can stage in over time (introduce the alternate name, rename everything in tree, then drop the old name in a few months).

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201202/459ee538/attachment.html>


More information about the llvm-dev mailing list