builtins: silence a MSVC warning

_BitReverse64 is only available on ARM and x64.  Guard it accordingly.

llvm-svn: 249949
This commit is contained in:
Saleem Abdulrasool 2015-10-10 17:57:37 +00:00
parent fbd8bb6fee
commit 9650c4a26e
1 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,7 @@ uint32_t __inline __builtin_clz(uint32_t value) {
return 32;
}
#if defined(_M_ARM) || defined(_M_X64)
uint32_t __inline __builtin_clzll(uint64_t value) {
uint32_t leading_zero = 0;
if (_BitScanReverse64(&leading_zero, value))
@ -115,5 +116,6 @@ uint32_t __inline __builtin_clzll(uint64_t value) {
#define __builtin_clzl __builtin_clzll
#endif
#endif
#endif /* INT_LIB_H */