[PATCH] D87326: [ADT] Fix reference invalidation when self referencing a SmallVector
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 15:35:07 PST 2020
dexonsmith added a comment.
In D87326#2395162 <https://reviews.llvm.org/D87326#2395162>, @dexonsmith wrote:
>> Downside is it would require copying most of the small vector implementation code for this special case, kind of like what currently happens for `SmallVectorTemplateBase` with trivially copyable types.
>>
>> Given that a lot of use cases of SmallVector seem to be for storing pointers or as the base class for SmallString, this would remove this specific overhead in these cases.
>
> That seems really valuable, and could be committed separately/ahead of the rest of this patch.
Here's a quick attempt at it: https://reviews.llvm.org/D91467
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87326/new/
https://reviews.llvm.org/D87326
More information about the llvm-commits
mailing list