[PATCH] D22512: Added hash_stream class for producing hash codes from data streams.
Raphael Isemann via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 07:10:40 PDT 2016
teemperor created this revision.
teemperor added a subscriber: llvm-commits.
So far LLVM only offers hashing for data sets that have to be fully accessible during hashing (such as containers). To conform to this API, it is sometimes necessary for the user to first collect and store all necessary data and afterwards pass it to the hash functions. An example for this is FoldingSetNodeID which is sometimes used to just generate hash codes and uses this workaround.
This patch adds a class which has an API that allows providing the data piece by piece, eliminating the need to store all the date before hashing it. hash_stream produces hash codes with the same quality as hash_combine and hash_value as it uses the same backend.
https://reviews.llvm.org/D22512
Files:
include/llvm/ADT/Hashing.h
unittests/ADT/HashingTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22512.64485.patch
Type: text/x-patch
Size: 9423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/c9a36b0f/attachment.bin>
More information about the llvm-commits
mailing list