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

Rafael Espíndola via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 08:05:51 PDT 2015


Ok, please add a comment about that and switch to smallptrset.
On Oct 11, 2015 11:00 AM, "Rui Ueyama" <ruiu at google.com> wrote:

> 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/0d3fc4df/attachment.html>


More information about the llvm-commits mailing list