Skip to content

Commit cc21965

Browse files
author
Jenkins
committed
merge main into amd-staging
Change-Id: I8bcf34f107a6d365b5f3be9df90ceb2b09e1cfcc
2 parents d3de937 + b8d0cba commit cc21965

File tree

58 files changed

+839
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+839
-281
lines changed

clang/include/clang/Basic/Cuda.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ const char *CudaVersionToString(CudaVersion V);
5050
// Input is "Major.Minor"
5151
CudaVersion CudaStringToVersion(const llvm::Twine &S);
5252

53+
// We have a name conflict with sys/mac.h on AIX
54+
#ifdef SM_32
55+
#undef SM_32
56+
#endif
5357
enum class CudaArch {
5458
UNUSED,
5559
UNKNOWN,

clang/lib/Sema/SemaCast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static bool tryDiagnoseOverloadedCast(Sema &S, CastType CT,
500500

501501
case OR_Deleted: {
502502
OverloadCandidateSet::iterator Best;
503-
OverloadingResult Res =
503+
[[maybe_unused]] OverloadingResult Res =
504504
candidates.BestViableFunction(S, range.getBegin(), Best);
505505
assert(Res == OR_Deleted && "Inconsistent overload resolution");
506506

libcxx/docs/ReleaseNotes/19.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Implemented Papers
4343
- P2819R2 - Add ``tuple`` protocol to ``complex``
4444
- P2495R3 - Interfacing ``stringstream``\s with ``string_view``
4545
- P2867R2 - Remove Deprecated ``strstream``\s From C++26
46+
- P2869R4 - Remove Deprecated ``shared_ptr`` Atomic Access APIs from C++26
4647
- P2872R3 - Remove ``wstring_convert`` From C++26
4748
- P3142R0 - Printing Blank Lines with ``println`` (as DR against C++23)
4849
- P2302R4 - ``std::ranges::contains``
@@ -63,6 +64,9 @@ Improvements and New Features
6364

6465
- The ``_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM`` macro has been added to make the declarations in ``<strstream>`` available.
6566

67+
- The ``_LIBCPP_ENABLE_CXX26_REMOVED_SHARED_PTR_ATOMICS`` macro has been added to make the declarations in ``<memory>``
68+
available.
69+
6670
- The ``_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT`` macro has been added to make the declarations in ``<locale>``
6771
available.
6872

libcxx/docs/Status/Cxx20.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Paper Status
5959
* ``GPS clock`` not done
6060
* ``UTC clock`` not done
6161
62+
.. [#note-P0718] P0718: Implemented deprecation of ``shared_ptr`` atomic access APIs only.
63+
6264
.. _issues-status-cxx20:
6365

6466
Library Working Group Issues Status

libcxx/docs/Status/Cxx20Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"`P0600R1 <https://wg21.link/P0600R1>`__","LWG","nodiscard in the Library","Albuquerque","|Complete|","16.0"
1313
"`P0616R0 <https://wg21.link/P0616R0>`__","LWG","de-pessimize legacy <numeric> algorithms with std::move","Albuquerque","|Complete|","12.0"
1414
"`P0653R2 <https://wg21.link/P0653R2>`__","LWG","Utility to convert a pointer to a raw pointer","Albuquerque","|Complete|","6.0"
15-
"`P0718R2 <https://wg21.link/P0718R2>`__","LWG","Atomic shared_ptr","Albuquerque","",""
15+
"`P0718R2 <https://wg21.link/P0718R2>`__","LWG","Atomic shared_ptr","Albuquerque","|Partial| [#note-P0718]_",""
1616
"`P0767R1 <https://wg21.link/P0767R1>`__","CWG","Deprecate POD","Albuquerque","|Complete|","7.0"
1717
"`P0768R1 <https://wg21.link/P0768R1>`__","CWG","Library Support for the Spaceship (Comparison) Operator","Albuquerque","|Complete|",""
1818
"`P0777R1 <https://wg21.link/P0777R1>`__","LWG","Treating Unnecessary ``decay``\ ","Albuquerque","|Complete|","7.0"

libcxx/docs/Status/Cxx2cPapers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"","","","","","",""
4949
"`P2875R4 <https://wg21.link/P2875R4>`__","LWG","Undeprecate ``polymorphic_allocator::destroy`` for C++26","Tokyo March 2024","|Complete|","15.0",""
5050
"`P2867R2 <https://wg21.link/P2867R2>`__","LWG","Remove Deprecated ``strstreams`` From C++26","Tokyo March 2024","|Complete|","19.0",""
51-
"`P2869R4 <https://wg21.link/P2869R4>`__","LWG","Remove Deprecated ``shared_ptr`` Atomic Access APIs from C++26","Tokyo March 2024","","",""
51+
"`P2869R4 <https://wg21.link/P2869R4>`__","LWG","Remove Deprecated ``shared_ptr`` Atomic Access APIs from C++26","Tokyo March 2024","|Complete|","19.0",""
5252
"`P2872R3 <https://wg21.link/P2872R3>`__","LWG","Remove ``wstring_convert`` From C++26","Tokyo March 2024","|Complete|","19.0",""
5353
"`P3107R5 <https://wg21.link/P3107R5>`__","LWG","Permit an efficient implementation of ``std::print``","Tokyo March 2024","","","|format| |DR|"
5454
"`P3142R0 <https://wg21.link/P3142R0>`__","LWG","Printing Blank Lines with ``println``","Tokyo March 2024","|Complete|","19.0","|format|"

libcxx/docs/UsingLibcxx.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,14 @@ C++26 Specific Configuration Macros
277277
**_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM**:
278278
This macro is used to re-enable all named declarations in ``<strstream>``.
279279

280+
**_LIBCPP_ENABLE_CXX26_REMOVED_SHARED_PTR_ATOMICS**:
281+
This macro is used to re-enable all ``shared_ptr`` atomic access APIs in ``<memory>``.
282+
280283
**_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT**:
281284
This macro is used to re-enable the ``wstring_convert`` and ``wbuffer_convert``
282285
in ``<locale>``.
283286

287+
284288
Libc++ Extensions
285289
=================
286290

libcxx/include/__memory/shared_ptr.h

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,13 +1580,15 @@ class _LIBCPP_EXPORTED_FROM_ABI __sp_mut {
15801580

15811581
_LIBCPP_EXPORTED_FROM_ABI __sp_mut& __get_sp_mut(const void*);
15821582

1583+
# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_SHARED_PTR_ATOMICS)
1584+
15831585
template <class _Tp>
1584-
inline _LIBCPP_HIDE_FROM_ABI bool atomic_is_lock_free(const shared_ptr<_Tp>*) {
1586+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool atomic_is_lock_free(const shared_ptr<_Tp>*) {
15851587
return false;
15861588
}
15871589

15881590
template <class _Tp>
1589-
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p) {
1591+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p) {
15901592
__sp_mut& __m = std::__get_sp_mut(__p);
15911593
__m.lock();
15921594
shared_ptr<_Tp> __q = *__p;
@@ -1595,25 +1597,28 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> atomic_load(const shared_ptr<_Tp>* __p) {
15951597
}
15961598

15971599
template <class _Tp>
1598-
inline _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) {
1600+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
1601+
atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) {
15991602
return std::atomic_load(__p);
16001603
}
16011604

16021605
template <class _Tp>
1603-
_LIBCPP_HIDE_FROM_ABI void atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) {
1606+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) {
16041607
__sp_mut& __m = std::__get_sp_mut(__p);
16051608
__m.lock();
16061609
__p->swap(__r);
16071610
__m.unlock();
16081611
}
16091612

16101613
template <class _Tp>
1611-
inline _LIBCPP_HIDE_FROM_ABI void atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) {
1614+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void
1615+
atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) {
16121616
std::atomic_store(__p, __r);
16131617
}
16141618

16151619
template <class _Tp>
1616-
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) {
1620+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
1621+
atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) {
16171622
__sp_mut& __m = std::__get_sp_mut(__p);
16181623
__m.lock();
16191624
__p->swap(__r);
@@ -1622,13 +1627,13 @@ _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp> atomic_exchange(shared_ptr<_Tp>* __p, shar
16221627
}
16231628

16241629
template <class _Tp>
1625-
inline _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
1630+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI shared_ptr<_Tp>
16261631
atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order) {
16271632
return std::atomic_exchange(__p, __r);
16281633
}
16291634

16301635
template <class _Tp>
1631-
_LIBCPP_HIDE_FROM_ABI bool
1636+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool
16321637
atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w) {
16331638
shared_ptr<_Tp> __temp;
16341639
__sp_mut& __m = std::__get_sp_mut(__p);
@@ -1646,23 +1651,25 @@ atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, share
16461651
}
16471652

16481653
template <class _Tp>
1649-
inline _LIBCPP_HIDE_FROM_ABI bool
1654+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool
16501655
atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w) {
16511656
return std::atomic_compare_exchange_strong(__p, __v, __w);
16521657
}
16531658

16541659
template <class _Tp>
1655-
inline _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_strong_explicit(
1660+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_strong_explicit(
16561661
shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w, memory_order, memory_order) {
16571662
return std::atomic_compare_exchange_strong(__p, __v, __w);
16581663
}
16591664

16601665
template <class _Tp>
1661-
inline _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_weak_explicit(
1666+
_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool atomic_compare_exchange_weak_explicit(
16621667
shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w, memory_order, memory_order) {
16631668
return std::atomic_compare_exchange_weak(__p, __v, __w);
16641669
}
16651670

1671+
# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_SHARED_PTR_ATOMICS)
1672+
16661673
#endif // !defined(_LIBCPP_HAS_NO_THREADS)
16671674

16681675
_LIBCPP_END_NAMESPACE_STD

0 commit comments

Comments
 (0)