[libc-commits] [libc] [llvm] [libc] Remove obsolete LIBC_HAS_BUILTIN macro (PR #86554)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Mar 27 07:07:54 PDT 2024
================
@@ -166,7 +172,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 LIBC_HAS_BUILTIN(__atomic_signal_fence)
+#if __has_builtin(__atomic_signal_fence)
----------------
jhuber6 wrote:
So, I think `if constexpr` has the issue that it doesn't necessarily cull the AST if the related builtin wasn't found. So you can get cases where it will still error or emit a warning.
https://github.com/llvm/llvm-project/pull/86554
More information about the libc-commits
mailing list