[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:36:16 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:

Ah, yeah. I remember running into that because `constexpr` is only evaluated after the AST is built.

https://github.com/llvm/llvm-project/pull/82377


More information about the libc-commits mailing list