From d28179ee17acd73c7916e917ab1de1be899f87fd Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Sat, 9 Apr 2016 20:25:02 +0000 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/Hashing.h b/include/llvm/ADT/Hashing.h index 6c01b15d7f0..c54a4c0aebd 100644 --- a/include/llvm/ADT/Hashing.h +++ b/include/llvm/ADT/Hashing.h @@ -633,7 +633,7 @@ template typename std::enable_if::value, hash_code>::type hash_value(T value) { return ::llvm::hashing::detail::hash_integer_value( - static_cast::type>(value)); + static_cast(value)); } // Declared and documented above, but defined here so that any of the hashing -- 2.11.0