mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
0b0b58f2c4
Summary: As discussed in D18775 making AtomicOrdering an enum class makes it non-hashable, which shouldn't be the case. Hashing.h defines hash_value for all is_integral_or_enum, but type_traits.h's definition of is_integral_or_enum only checks for *inplicit* conversion to integral types which leaves enum classes out and is very confusing because is_enum is true for enum classes. This patch: - Adds a check for is_enum when determining is_integral_or_enum. - Explicitly converts the value parameter in hash_value to handle enum class hashing. Note that the warning at the top of Hashing.h still applies: each execution of the program has a high probability of producing a different hash_code for a given input. Thus their values are not stable to save or persist, and should only be used during the execution for the construction of hashing datastructures. Reviewers: dberlin, chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18938 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265879 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
llvm | ||
llvm-c |