[lld] r187665 - [PECOFF] Remove an assertion that's too heavy.

Rui Ueyama ruiu at google.com
Mon Aug 5 21:01:51 PDT 2013


I updated the file after this change, and we are now using std::map with
the originalOffset as key. std::map is a sorted list so it's guaranteed
that the map is sorted.


On Mon, Aug 5, 2013 at 8:57 PM, Shankar Easwaran <shankare at codeaurora.org>wrote:

>
> Thought this is a good assert, doesnt this work for all cases. Isnt this
> the fundamental model of splitting a section into multiple atoms too ?
>
>
> On 8/2/2013 2:10 PM, Rui Ueyama wrote:
>
>> Author: ruiu
>> Date: Fri Aug  2 14:10:29 2013
>> New Revision: 187665
>>
>> URL: http://llvm.org/viewvc/llvm-**project?rev=187665&view=rev<http://llvm.org/viewvc/llvm-project?rev=187665&view=rev>
>> Log:
>> [PECOFF] Remove an assertion that's too heavy.
>>
>> Modified:
>>      lld/trunk/lib/ReaderWriter/**PECOFF/ReaderCOFF.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/**PECOFF/ReaderCOFF.cpp
>> URL: http://llvm.org/viewvc/llvm-**project/lld/trunk/lib/**
>> ReaderWriter/PECOFF/**ReaderCOFF.cpp?rev=187665&r1=**
>> 187664&r2=187665&view=diff<http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=187665&r1=187664&r2=187665&view=diff>
>> ==============================**==============================**
>> ==================
>> --- lld/trunk/lib/ReaderWriter/**PECOFF/ReaderCOFF.cpp (original)
>> +++ lld/trunk/lib/ReaderWriter/**PECOFF/ReaderCOFF.cpp Fri Aug  2
>> 14:10:29 2013
>> @@ -317,12 +317,6 @@ private:
>>     COFFDefinedFileAtom *
>>     findAtomAt(uint32_t targetOffset,
>>                const vector<COFFDefinedFileAtom *> &atoms) const {
>> -    assert(std::is_sorted(atoms.**begin(), atoms.end(),
>> -                          [](const COFFDefinedFileAtom * a,
>> -                             const COFFDefinedFileAtom * b) -> bool {
>> -                            return a->originalOffset() <
>> b->originalOffset();
>> -                          }));
>> -
>>       for (COFFDefinedFileAtom *atom : atoms)
>>         if (targetOffset < atom->originalOffset() + atom->size())
>>           return atom;
>>
>>
>> ______________________________**_________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>
>>
>>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130805/4a01a2e8/attachment.html>


More information about the llvm-commits mailing list