[libc] [llvm] [libc] Remove obsolete LIBC_HAS_BUILTIN macro (PR #86554)
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 08:36:40 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)
----------------
gchatelet wrote:
Also https://github.com/llvm/llvm-project/pull/86554#discussion_r1541286366.
Thx for pointing me to your comment, I missed it.
https://github.com/llvm/llvm-project/pull/86554
More information about the llvm-commits
mailing list