Details
Details
- Reviewers
compnerd
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Put the functions in int_lib.h instead, since some of the functions that use them only include that
Comment Actions
Why is it insufficient to do this?
#if defined(_MSC_VER) && !defined(__clang__) #define __builtin_clz __builtin_clzl #define __builtin_ctz __builtin_ctzl #define __builtin_clzl __builtin_ctzll #endif
I don't understand the definition of __builtin_clzll. _BitScanReverse64 it is implemented in terms of __builtin_clzll for clang.
lib/builtins/int_lib.h | ||
---|---|---|
82 | This should be: #if defined(_MSC_VER) && !defined(__clang__) |
Comment Actions
_BitScanReverse gives the index of the first set bit starting from the most significant bit, where the index is zero from the LSB.
lib/builtins/int_lib.h | ||
---|---|---|
101 | You should be able to drop the braces; use 2-space indents as per the LLVM style. |
You should be able to drop the braces; use 2-space indents as per the LLVM style.