[PATCH] LLD: Use std::vector to store SimpleReferences instead of linked list.

Rui Ueyama ruiu at google.com
Mon Mar 9 21:55:16 PDT 2015


Where is the code? Looks like SimpleReference is used only by PE/COFF port.

On Mon, Mar 9, 2015 at 3:46 PM, Jean-Daniel Dupas <mailing at xenonium.com>
wrote:

> SimpleReference was implemented using a vector not so long ago, but that
> design choice was made because std::vector is not bumpPtrAllocator friendly.
> Mach-O implementation (at least) uses a bumpPtrAllocator to allocate the
> SimpleReferences. So SimpleReference destructor is never call, and so are
> members destructor.
> If you use a std::vector, it means you will leak the vector storage
> memory. As all ilist nodes are allocated using the bumpPtr allocator, we
> don’t have that issue.
>
>
> http://reviews.llvm.org/D8182
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150309/70e2032c/attachment.html>


More information about the llvm-commits mailing list