[libc-commits] [libc] [libc] use LIBC_HAS_BUILTIN instead __has_builtin (PR #82377)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Tue Feb 20 08:30:37 PST 2024
================
@@ -166,7 +166,7 @@ LIBC_INLINE void atomic_thread_fence([[maybe_unused]] MemoryOrder mem_ord) {
// except no instructions for memory ordering are issued. Only reordering of
// the instructions by the compiler is suppressed as order instructs.
LIBC_INLINE void atomic_signal_fence([[maybe_unused]] MemoryOrder mem_ord) {
-#if __has_builtin(__atomic_signal_fence)
+#if LIBC_HAS_BUILTIN(__atomic_signal_fence)
----------------
jhuber6 wrote:
`constexpr if` would be a good fit here as well.
https://github.com/llvm/llvm-project/pull/82377
More information about the libc-commits
mailing list