vlc | branch: master | Rémi Denis-Courmont <r...@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()

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to