[libcxx-commits] [libcxx] c19a819 - [libc++] protect absent atomic types with ifdef (#82351)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 26 22:27:05 PST 2024
Author: Dominik Wójt
Date: 2024-02-27T07:27:02+01:00
New Revision: c19a81931ce47278967056927aa87a7685e5447c
URL: https://github.com/llvm/llvm-project/commit/c19a81931ce47278967056927aa87a7685e5447c
DIFF: https://github.com/llvm/llvm-project/commit/c19a81931ce47278967056927aa87a7685e5447c.diff
LOG: [libc++] protect absent atomic types with ifdef (#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.
Added:
Modified:
libcxx/modules/std/atomic.inc
Removed:
################################################################################
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