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.
I think it's worth mentioning that hash_stream wasn't proposed as part of N3333, unlikle other classes in this file. Or maybe it could be proposed :)