diff options
author | Bruno Haible <bruno@clisp.org> | 2020-08-16 18:36:57 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2020-08-16 18:36:57 +0200 |
commit | 852b8a9d6ede8cc71b95727b337166a5b70cecf5 (patch) | |
tree | 3e2dc0a07f957f4cf958927fd210c15db02f88a9 /lib/gl_anytreehash_list1.h | |
parent | 0fc41d2b9777053f57199426a1e14e6fa425d3c5 (diff) | |
download | gnulib-852b8a9d6ede8cc71b95727b337166a5b70cecf5.tar.gz |
avltreehash-list, rbtreehash-list: Optimize also on clang.
* lib/gl_anytreehash_list1.h (add_nodes_to_buckets): Use
__builtin_expect also on clang.
Diffstat (limited to 'lib/gl_anytreehash_list1.h')
-rw-r--r-- | lib/gl_anytreehash_list1.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gl_anytreehash_list1.h b/lib/gl_anytreehash_list1.h index aba45d6c59..88fac00373 100644 --- a/lib/gl_anytreehash_list1.h +++ b/lib/gl_anytreehash_list1.h @@ -340,7 +340,7 @@ add_nodes_to_buckets (gl_list_t list) return -1; } /* Tell GCC that the likely return value is 0. */ -#if __GNUC__ >= 3 +#if (__GNUC__ >= 3) || (__clang_major__ >= 4) # define add_nodes_to_buckets(list) \ __builtin_expect ((add_nodes_to_buckets) (list), 0) #endif |