[ADT] Simplify hashing for tuples
authorJoe Loser <joeloser@fastmail.com>
Thu, 27 Oct 2022 15:05:08 +0000 (09:05 -0600)
committerJoe Loser <joeloser@fastmail.com>
Thu, 27 Oct 2022 19:44:43 +0000 (13:44 -0600)
commit8d35558527ba9faa8a2a17201a2b3a3d9053e2f9
tree9063612933aebb66a5f6b8f62f8a9d4312491c7e
parentfd90f542cf60c2a4e735f35513268c052686dbd6
[ADT] Simplify hashing for tuples

Instead of using `std::index_sequence` with a helper function template to access
each element in the tuple, leverage `std::apply` from C++17 to do the heavy
lifting for us.

Differential Revision: https://reviews.llvm.org/D136850
llvm/include/llvm/ADT/Hashing.h