mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 03:51:20 -03:00
don't use __has_builtin
GCC doesn't have this until GCC 10. Just assume it exists, as our compiler requirements mean it should exist.
This commit is contained in:
@@ -309,13 +309,8 @@ void wcs2string_appending(const wchar_t *in, size_t len, std::string *receiver);
|
||||
bool should_suppress_stderr_for_tests();
|
||||
|
||||
/// Branch prediction hints. Idea borrowed from Linux kernel. Just used for asserts.
|
||||
#if __has_builtin(__builtin_expect)
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
#else
|
||||
#define likely(x) (x)
|
||||
#define unlikely(x) (x)
|
||||
#endif
|
||||
|
||||
void assert_is_main_thread(const char *who);
|
||||
#define ASSERT_IS_MAIN_THREAD_TRAMPOLINE(x) assert_is_main_thread(x)
|
||||
|
||||
Reference in New Issue
Block a user