aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/memory_resource.cpp
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2024-11-06 10:39:19 +0100
committerGitHub <noreply@github.com>2024-11-06 10:39:19 +0100
commitc6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c (patch)
treedbfd623fea1771448ff564d5fc4221db7fca2f84 /libcxx/src/memory_resource.cpp
parent5acc4a3dc0e2145d2bfef47f1543bb291c2b866a (diff)
downloadllvm-c6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c.zip
llvm-c6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c.tar.gz
llvm-c6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c.tar.bz2
[libc++] Refactor the configuration macros to being always defined (#112094)
This is a follow-up to #89178. This updates the `<__config_site>` macros.
Diffstat (limited to 'libcxx/src/memory_resource.cpp')
-rw-r--r--libcxx/src/memory_resource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/src/memory_resource.cpp b/libcxx/src/memory_resource.cpp
index 3d0d4ea..0cd575e 100644
--- a/libcxx/src/memory_resource.cpp
+++ b/libcxx/src/memory_resource.cpp
@@ -12,7 +12,7 @@
#if _LIBCPP_HAS_ATOMIC_HEADER
# include <atomic>
-#elif !defined(_LIBCPP_HAS_NO_THREADS)
+#elif _LIBCPP_HAS_THREADS
# include <mutex>
# if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
# pragma comment(lib, "pthread")
@@ -101,7 +101,7 @@ static memory_resource* __default_memory_resource(bool set = false, memory_resou
} else {
return std::atomic_load_explicit(&__res, memory_order_acquire);
}
-#elif !defined(_LIBCPP_HAS_NO_THREADS)
+#elif _LIBCPP_HAS_THREADS
static constinit memory_resource* res = &res_init.resources.new_delete_res;
static mutex res_lock;
if (set) {