[vlc-commits] clang: enable branch prediction as on GCC
Rémi Denis-Courmont
git at videolan.org
Sun Feb 11 14:13:06 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 11 14:30:24 2018 +0200| [1703087d96d5d63c6e9e4c8ca7b808e0685ad112] | committer: Rémi Denis-Courmont
clang: enable branch prediction as on GCC
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1703087d96d5d63c6e9e4c8ca7b808e0685ad112
---
include/vlc_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/vlc_common.h b/include/vlc_common.h
index 41c1ce4063..c03f4153cd 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -109,7 +109,7 @@
/* Branch prediction */
-#ifdef __GNUC__
+#if defined (__GNUC__) || defined (__clang__)
# define likely(p) __builtin_expect(!!(p), 1)
# define unlikely(p) __builtin_expect(!!(p), 0)
# define unreachable() __builtin_unreachable()
More information about the vlc-commits
mailing list