OSDN Git Service

Fix hash_integer_value
authorJF Bastien <jfb@google.com>
Sat, 9 Apr 2016 20:25:02 +0000 (20:25 +0000)
committerJF Bastien <jfb@google.com>
Sat, 9 Apr 2016 20:25:02 +0000 (20:25 +0000)
commitd28179ee17acd73c7916e917ab1de1be899f87fd
tree4fcbce80d9e18ac704460ec51656cc0a5844b21c
parent0b0b58f2c455f00e4d7a0a2429b0e5139f5b6029
Fix hash_integer_value

Broken in D18938 because underlying_type only works for enums and not all stdlibs are sad when given a non-enum. Bots error out with 'only enumeration types have underlying types'.

There's probably a clever enable_if-ism that I can do with underlying_type and the actual integer value, but is_integral_or_enum also accepts implicit conversion so I need to ponder my life choices a bit before committing to template magic. A quick fix for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265880 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Hashing.h