[libcxx-commits] [libcxx] [libc++] protect absent atomic types with ifdef (PR #82351)
Dominik Wójt via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 20 04:26:37 PST 2024
https://github.com/domin144 created https://github.com/llvm/llvm-project/pull/82351
Otherwise modules.std-module.sh.cpp test fails with following error:
error: no member named 'atomic_signed_lock_free' in namespace 'std'
when the types are not available.
>From 19e40afe7308c3a1364ea54cefbcca9d3f3eaefc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20W=C3=B3jt?= <dominik.wojt at arm.com>
Date: Mon, 19 Feb 2024 11:23:25 +0100
Subject: [PATCH] [libc++] protect absent atomic types with ifdef
Otherwise modules.std-module.sh.cpp test fails with following error:
error: no member named 'atomic_signed_lock_free' in namespace 'std'
when the types are not available.
---
libcxx/modules/std/atomic.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libcxx/modules/std/atomic.inc b/libcxx/modules/std/atomic.inc
index 88b31ccdb20840..2b54cef863e571 100644
--- a/libcxx/modules/std/atomic.inc
+++ b/libcxx/modules/std/atomic.inc
@@ -111,8 +111,10 @@ export namespace std {
using std::atomic_uintmax_t;
using std::atomic_uintptr_t;
+#ifndef _LIBCPP_NO_LOCK_FREE_TYPES
using std::atomic_signed_lock_free;
using std::atomic_unsigned_lock_free;
+#endif
// [atomics.flag], flag type and operations
using std::atomic_flag;
More information about the libcxx-commits
mailing list