[libc-commits] [PATCH] D127692: [libc] Guard common macro names
Alex Brachet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jun 14 08:05:55 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG60d4a1071069: [libc] Guard common macro names (authored by abrachet).
Herald added a project: libc-project.
Herald added a subscriber: libc-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127692/new/
https://reviews.llvm.org/D127692
Files:
libc/src/__support/common.h
Index: libc/src/__support/common.h
===================================================================
--- libc/src/__support/common.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127692.436789.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220614/af978db5/attachment.bin>
More information about the libc-commits
mailing list