[LLVMdev] [lld] contentHash in the Reader ?

Rui Ueyama ruiu at google.com
Wed May 8 09:03:15 PDT 2013


On Thu, May 9, 2013 at 12:04 AM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> On 5/8/2013 12:38 AM, Michael Spencer wrote:
>
>> On Tue, May 7, 2013 at 10:08 PM, Nick Kledzik <kledzik at apple.com> wrote:
>>
>>  Shankar,
>>>
>>> Do you mean add a method like:
>>>
>>>       virtual unsigned contentHash() const = 0;
>>>
>>> or maybe:
>>>
>>>       virtual llvm::hash_code contentHash() const = 0
>>>
>> We could use a crypto hash too with the function prototype that looks
> like :-
>
>      virtual lld::crypto::sha256 contentHash() const = 0


I'd use SHA128 or MD5 as the linker does not handle hostile input. I think
as long as it's collision free, it should suffice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130509/9ff353fa/attachment.html>


More information about the llvm-dev mailing list