[llvm-commits] [llvm] r152369 - /llvm/trunk/include/llvm/ADT/Hashing.h

Chandler Carruth chandlerc at google.com
Fri Mar 9 01:13:10 PST 2012


On Fri, Mar 9, 2012 at 12:33 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Chandler,
>
> > Fix a silly restriction on the fast-path for hash_combine_range.
>
> is it really silly?  Hash functions shouldn't be modifying what they are
> hashing should they?
>
> Ciao, Duncan.


Ah, but that's not what this change impacted. ;] That's what I *thought* i
was doing when I first added this. The actual result is that this overload
only matched pointers-to-const. pointers-to-non-const ended up calling the
super slow iterator variation. And the first thing we do with these is cast
them to const char* so we wont go scribbling on the bits.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120309/365889f5/attachment.html>


More information about the llvm-commits mailing list