[libc] Guard common macro names

Differential revision: https://reviews.llvm.org/D127692
This commit is contained in:
Alex Brachet 2022-06-14 15:05:16 +00:00
parent 6117784c5f
commit 60d4a10710

View File

@ -11,9 +11,15 @@
#define LIBC_INLINE_ASM __asm__ __volatile__
#ifndef likely
#define likely(x) __builtin_expect(!!(x), 1)
#endif
#ifndef unlikely
#define unlikely(x) __builtin_expect(x, 0)
#endif
#ifndef UNUSED
#define UNUSED __attribute__((unused))
#endif
#ifndef LLVM_LIBC_FUNCTION_ATTR
#define LLVM_LIBC_FUNCTION_ATTR