[PATCH] D19025: Hash symbol names only once per global SymbolBody

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 12 12:33:35 PDT 2016


sanjoy added a comment.

In http://reviews.llvm.org/D19025#398778, @ruiu wrote:

> Sanjoy,
>
> How would you add this to StringRef? Do you want to add a new word to StringRef for a hash value or are you suggesting something else?


I meant just moving the `Symbol` class (possibly renamed to something more generic) to somewhere in llvm/ADT so that it is easily discoverable.  Given that `StringRef` s are immutable anyway (so s/StringRef/Symbol in a DenseMap etc. is always correct), this looks like it could be useful more generally.

I didn't mean to suggest we should change `StringRef` itself.


http://reviews.llvm.org/D19025





More information about the llvm-commits mailing list