Commit f8de6667 by shinchiro Committed by Commit Bot

Fix compilation on mingw

BUG=angleproject:1795 Change-Id: Ic25805f99154395c9af28197ceb1218f9c5c3138 Reviewed-on: https://chromium-review.googlesource.com/434457Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 1d37bc50
...@@ -46,3 +46,4 @@ Jinyoung Hur ...@@ -46,3 +46,4 @@ Jinyoung Hur
Sebastian Bergstein Sebastian Bergstein
James Ross-Gowan James Ross-Gowan
Nickolay Artamonov Nickolay Artamonov
Ihsan Akmal
...@@ -807,9 +807,9 @@ inline uint32_t BitfieldReverse(uint32_t value) ...@@ -807,9 +807,9 @@ inline uint32_t BitfieldReverse(uint32_t value)
// Count the 1 bits. // Count the 1 bits.
inline int BitCount(unsigned int bits) inline int BitCount(unsigned int bits)
{ {
#if defined(ANGLE_PLATFORM_WINDOWS) #if defined(_MSC_VER)
return static_cast<int>(__popcnt(bits)); return static_cast<int>(__popcnt(bits));
#elif defined(ANGLE_PLATFORM_POSIX) #elif defined(__GNUC__)
return __builtin_popcount(bits); return __builtin_popcount(bits);
#else #else
#error Please implement bit count for your platform! #error Please implement bit count for your platform!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment