tuklib_integer: Use __builtin_clz() with Clang.
commit12321a9390acc076b414035a46df9d7545ac379f
authorJia Tan <jiat0218@gmail.com>
Wed, 19 Apr 2023 13:59:03 +0000 (19 21:59 +0800)
committerJia Tan <jiat0218@gmail.com>
Tue, 25 Apr 2023 12:19:28 +0000 (25 20:19 +0800)
tree65f90a946e8d514e4cbd0b4bb929c90bd8b9b521
parentd1f0e01c395960efd6c29ff144eda4f4c8c1c6d3
tuklib_integer: Use __builtin_clz() with Clang.

Clang has support for __builtin_clz(), but previously Clang would
fallback to either the MSVC intrinsic or the regular C code. This was
discovered due to a bug where a new version of Clang required the
<intrin.h> header file in order to use the MSVC intrinsics.

Thanks to Anton Kochkov for notifying us about the bug.
src/common/tuklib_integer.h