From 60d4a10710693d9562fa2c01307d2acddbe104bb Mon Sep 17 00:00:00 2001 From: Alex Brachet Date: Tue, 14 Jun 2022 15:05:16 +0000 Subject: [PATCH] [libc] Guard common macro names Differential revision: https://reviews.llvm.org/D127692 --- libc/src/__support/common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h index 2660e7f..9e28be0 100644 --- a/libc/src/__support/common.h +++ b/libc/src/__support/common.h @@ -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 -- 2.7.4