From b630017460e482f84e4b5062b30098d1d37c0a0a Mon Sep 17 00:00:00 2001 From: Vladimir 'virtul' Ivannikov Date: Tue, 4 Feb 2025 16:09:37 +0300 Subject: [PATCH] implement EASTL_[UN]LIKELY on clang (in addition to gcc) It supported it since forever, there is no point not to use it --- include/EASTL/internal/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/EASTL/internal/config.h b/include/EASTL/internal/config.h index 6c13117b..0691a5b0 100644 --- a/include/EASTL/internal/config.h +++ b/include/EASTL/internal/config.h @@ -1202,7 +1202,7 @@ namespace eastl /////////////////////////////////////////////////////////////////////////////// #ifndef EASTL_LIKELY - #if defined(__GNUC__) && (__GNUC__ >= 3) + #if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__clang__) #define EASTL_LIKELY(x) __builtin_expect(!!(x), true) #define EASTL_UNLIKELY(x) __builtin_expect(!!(x), false) #else