forked from OSchip/llvm-project
builtins: silence a MSVC warning
_BitReverse64 is only available on ARM and x64. Guard it accordingly. llvm-svn: 249949
This commit is contained in:
parent
fbd8bb6fee
commit
9650c4a26e
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue