[PATCH] D87326: [ADT] Fix reference invalidation when self referencing a SmallVector

Nathan James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 05:01:39 PDT 2020


njames93 updated this revision to Diff 291544.
njames93 added a comment.

Fix for the case if anyone tries SmallVector.emplace_back(SmallVector[X]) being invalidated on growth.
Added missing `else if` inside SmallVector append methods.
Refactored GrowBufferBase to take the Size_T as the template arguments to reduce template instantiations.
Use global namespace new inside GrowBuffer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87326/new/

https://reviews.llvm.org/D87326

Files:
  llvm/include/llvm/ADT/SmallVector.h
  llvm/unittests/ADT/SmallVectorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87326.291544.patch
Type: text/x-patch
Size: 26133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200914/0c8ec324/attachment.bin>


More information about the llvm-commits mailing list