[compiler-rt] r249949 - builtins: silence a MSVC warning
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 10 10:57:37 PDT 2015
Author: compnerd
Date: Sat Oct 10 12:57:37 2015
New Revision: 249949
URL: http://llvm.org/viewvc/llvm-project?rev=249949&view=rev
Log:
builtins: silence a MSVC warning
_BitReverse64 is only available on ARM and x64. Guard it accordingly.
Modified:
compiler-rt/trunk/lib/builtins/int_lib.h
Modified: compiler-rt/trunk/lib/builtins/int_lib.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/int_lib.h?rev=249949&r1=249948&r2=249949&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/int_lib.h (original)
+++ compiler-rt/trunk/lib/builtins/int_lib.h Sat Oct 10 12:57:37 2015
@@ -106,6 +106,7 @@ uint32_t __inline __builtin_clz(uint32_t
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
#define __builtin_clzl __builtin_clzll
#endif
+#endif
#endif /* INT_LIB_H */
More information about the llvm-commits
mailing list