diff options
author | Nick Desaulniers <nickdesaulniers@users.noreply.github.com> | 2024-02-14 08:47:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 08:47:09 -0800 |
commit | 4efbf524ad2726f6ff4cb095bebef3e871d4984e (patch) | |
tree | c6add69737a6fecbd098c235a19b7e38f1f342d6 /libc | |
parent | 8f4cd2c7e3c35f23004c1448705be8f673c2d271 (diff) | |
download | llvm-4efbf524ad2726f6ff4cb095bebef3e871d4984e.zip llvm-4efbf524ad2726f6ff4cb095bebef3e871d4984e.tar.gz llvm-4efbf524ad2726f6ff4cb095bebef3e871d4984e.tar.bz2 |
[libc][__support][bit] remove compiler has builtin checks (#81679)
We only support building llvmlibc with modern compilers.
https://libc.llvm.org/compiler_support.html#minimum-supported-versions
All versions of the these compilers support these builtins; GCC does not
support the short variants.
Diffstat (limited to 'libc')
-rw-r--r-- | libc/src/__support/CPP/bit.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/libc/src/__support/CPP/bit.h b/libc/src/__support/CPP/bit.h index 392fbe2..a8bf75a 100644 --- a/libc/src/__support/CPP/bit.h +++ b/libc/src/__support/CPP/bit.h @@ -93,15 +93,9 @@ template <typename T, typename = cpp::enable_if_t<cpp::is_unsigned_v<T>>> #if LIBC_HAS_BUILTIN(__builtin_ctzs) ADD_SPECIALIZATION(countr_zero, unsigned short, __builtin_ctzs) #endif -#if LIBC_HAS_BUILTIN(__builtin_ctz) ADD_SPECIALIZATION(countr_zero, unsigned int, __builtin_ctz) -#endif -#if LIBC_HAS_BUILTIN(__builtin_ctzl) ADD_SPECIALIZATION(countr_zero, unsigned long, __builtin_ctzl) -#endif -#if LIBC_HAS_BUILTIN(__builtin_ctzll) ADD_SPECIALIZATION(countr_zero, unsigned long long, __builtin_ctzll) -#endif /// Count number of 0's from the most significant bit to the least /// stopping at the first 1. @@ -128,15 +122,9 @@ template <typename T, typename = cpp::enable_if_t<cpp::is_unsigned_v<T>>> #if LIBC_HAS_BUILTIN(__builtin_clzs) ADD_SPECIALIZATION(countl_zero, unsigned short, __builtin_clzs) #endif -#if LIBC_HAS_BUILTIN(__builtin_clz) ADD_SPECIALIZATION(countl_zero, unsigned int, __builtin_clz) -#endif -#if LIBC_HAS_BUILTIN(__builtin_clzl) ADD_SPECIALIZATION(countl_zero, unsigned long, __builtin_clzl) -#endif -#if LIBC_HAS_BUILTIN(__builtin_clzll) ADD_SPECIALIZATION(countl_zero, unsigned long long, __builtin_clzll) -#endif #undef ADD_SPECIALIZATION @@ -256,15 +244,9 @@ template <typename T, typename = cpp::enable_if_t<cpp::is_unsigned_v<T>>> #if LIBC_HAS_BUILTIN(__builtin_clzs) SPECIALIZE_FLZ(first_leading_zero, unsigned short, __builtin_clzs) #endif -#if LIBC_HAS_BUILTIN(__builtin_clz) SPECIALIZE_FLZ(first_leading_zero, unsigned int, __builtin_clz) -#endif -#if LIBC_HAS_BUILTIN(__builtin_clzl) SPECIALIZE_FLZ(first_leading_zero, unsigned long, __builtin_clzl) -#endif -#if LIBC_HAS_BUILTIN(__builtin_clzll) SPECIALIZE_FLZ(first_leading_zero, unsigned long long, __builtin_clzll) -#endif #undef SPECIALIZE_FLZ |