[lld] r249955 - ELF2: Remove ProgramHeader class and use Elf_Phdr directly. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 08:00:28 PDT 2015


This vector will never be resized. We reserve the exact size first and then
use that vector.

On Sun, Oct 11, 2015 at 7:54 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> Actually,using any set on pointers (on trunk) looks like a bug. The
> vector can be resized and the pointers invalidated, no?
>
> You probably need a set on the indexes.
>
> On 11 October 2015 at 10:30, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
> > On 11 October 2015 at 10:24, Rui Ueyama <ruiu at google.com> wrote:
> >> Sorry about the style change. I'll separate them in future.
> >>
> >> I think the use of unordered_set is reasonable because the number of
> >> segments are very small.
> >
> > That is precisely why it is not reasonable :-)
> >
> > Playing with the code a bit it seems the best thing is to just replace
> > it with at SmallPtrSet.
> >
> > Cheers,
> > Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151011/abeeb949/attachment.html>


More information about the llvm-commits mailing list