Commit 7ec1fc0e authored by Darren Mo's avatar Darren Mo Committed by Sara Golemon

Clang Love

Summary: Added support for clang in Checksum.cpp preprocessor statements.

Test Plan: The right code path is chosen using both gcc and clang now.

Reviewed By: brianp@fb.com

Subscribers: mathieubaudet, sroy, satadru

FB internal diff: D1502289
parent 34307dc2
...@@ -24,8 +24,14 @@ namespace folly { ...@@ -24,8 +24,14 @@ namespace folly {
namespace detail { namespace detail {
#if FOLLY_X64 && defined(__GNUC__) && defined(__GNUC_MINOR__) && \ #ifndef __has_builtin
(((__GNUC__ * 100) + __GNUC_MINOR__) >= 407) #define __has_builtin(x) 0
#endif
#if (__has_builtin(__builtin_ia32_crc32qi) && \
__has_builtin(__builtin_ia32_crc32di)) || \
(FOLLY_X64 && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
(((__GNUC__ * 100) + __GNUC_MINOR__) >= 407))
// Fast SIMD implementation of CRC-32C for x86 with SSE 4.2 // Fast SIMD implementation of CRC-32C for x86 with SSE 4.2
uint32_t crc32c_hw(const uint8_t *data, size_t nbytes, uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,
......
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