From fba0b65f727134e8d05c785b04b7b574f852d49e Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Sun, 29 Nov 2020 13:52:28 +0000 Subject: [PATCH] [libc++] hash: adjust for x86-64 ILP32 x86-64 ILP32 mode (x32) uses 32-bit size_t, so share the code with ix86 to zero out padding bits, not with x86-64 LP64 mode. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D91349 --- libcxx/include/utility | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/utility b/libcxx/include/utility index 13489de..5c9e2b6 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -1506,7 +1506,7 @@ struct _LIBCPP_TEMPLATE_VIS hash // -0.0 and 0.0 should return same hash if (__v == 0.0L) return 0; -#if defined(__i386__) +#if defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__)) // Zero out padding bits union { -- 2.7.4