[libc-commits] [libc] [llvm] [libc] Remove obsolete LIBC_HAS_BUILTIN macro (PR #86554)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Wed Mar 27 08:24:27 PDT 2024
================
@@ -71,10 +71,11 @@ template <typename T> struct Atomic {
T load(MemoryOrder mem_ord = MemoryOrder::SEQ_CST,
[[maybe_unused]] MemoryScope mem_scope = MemoryScope::DEVICE) {
- if constexpr (LIBC_HAS_BUILTIN(__scoped_atomic_load_n))
- return __scoped_atomic_load_n(&val, int(mem_ord), (int)(mem_scope));
- else
- return __atomic_load_n(&val, int(mem_ord));
+#if __has_builtin(__scoped_atomic_load_n)
----------------
nickdesaulniers wrote:
See my rationale in https://github.com/llvm/llvm-project/pull/86554#discussion_r1538130801.
https://github.com/llvm/llvm-project/pull/86554
More information about the libc-commits
mailing list