summaryrefslogtreecommitdiff
path: root/lib/count-leading-zeros.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/count-leading-zeros.h')
-rw-r--r--lib/count-leading-zeros.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h
index 7e88c8cb9d0..7cf605a5f64 100644
--- a/lib/count-leading-zeros.h
+++ b/lib/count-leading-zeros.h
@@ -38,7 +38,8 @@ extern "C" {
expand to code that computes the number of leading zeros of the local
variable 'x' of type TYPE (an unsigned integer type) and return it
from the current function. */
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) \
+ || (__clang_major__ >= 4)
# define COUNT_LEADING_ZEROS(BUILTIN, MSC_BUILTIN, TYPE) \
return x ? BUILTIN (x) : CHAR_BIT * sizeof x;
#elif _MSC_VER