[libc-commits] [PATCH] D94445: [libc][NFC] Make __support/common.h an in tree header.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jan 11 13:11:08 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGaefeb5f136e7: [libc][NFC] Make __support/common.h an in tree header. (authored by sivachandra).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94445/new/
https://reviews.llvm.org/D94445
Files:
libc/src/__support/CMakeLists.txt
libc/src/__support/common.h
libc/src/__support/common.h.def
Index: libc/src/__support/common.h
===================================================================
--- libc/src/__support/common.h
+++ libc/src/__support/common.h
@@ -11,22 +11,22 @@
#define LIBC_INLINE_ASM __asm__ __volatile__
-#define likely(x) __builtin_expect (!!(x), 1)
-#define unlikely(x) __builtin_expect (x, 0)
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(x, 0)
#define UNUSED __attribute__((unused))
#ifndef LLVM_LIBC_FUNCTION_ATTR
- #define LLVM_LIBC_FUNCTION_ATTR
+#define LLVM_LIBC_FUNCTION_ATTR
#endif
#ifdef LLVM_LIBC_PUBLIC_PACKAGING
-#define LLVM_LIBC_FUNCTION(type, name, arglist) \
- LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) __##name##_impl__ __asm__(#name); \
- decltype(__llvm_libc::name) name [[gnu::alias(#name)]]; \
- type __##name##_impl__ arglist
+#define LLVM_LIBC_FUNCTION(type, name, arglist) \
+ LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) \
+ __##name##_impl__ __asm__(#name); \
+ decltype(__llvm_libc::name) name [[gnu::alias(#name)]]; \
+ type __##name##_impl__ arglist
#else
-#define LLVM_LIBC_FUNCTION(type, name, arglist)\
- type name arglist
+#define LLVM_LIBC_FUNCTION(type, name, arglist) type name arglist
#endif
#endif // LLVM_LIBC_SUPPORT_COMMON_H
Index: libc/src/__support/CMakeLists.txt
===================================================================
--- libc/src/__support/CMakeLists.txt
+++ libc/src/__support/CMakeLists.txt
@@ -1,9 +1,5 @@
-add_gen_header(
+add_header_library(
common
- DEF_FILE common.h.def
- PARAMS
- platform_defs=../../config/${LIBC_TARGET_OS}/platform_defs.h.inc
- GEN_HDR common.h
- DATA_FILES
- ../../config/${LIBC_TARGET_OS}/platform_defs.h.inc
+ HDRS
+ common.h
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94445.315921.patch
Type: text/x-patch
Size: 1908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210111/0bc27662/attachment.bin>
More information about the libc-commits
mailing list