[libcxx-commits] [libcxx] [libc++] Defer removal of _LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR to LLVM 25 (PR #211553)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 23 06:14:34 PDT 2026
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/211553
Rather than removing the escape hatch in LLVM 24, keep it around for another release since it hasn't been widely deployed yet. Reword the release note as an announcement of the future removal in LLVM 25 and update the TODO marker accordingly.
>From f6f8ebb07c545341b137b77e610116d9d4951f9a Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 23 Jul 2026 08:20:14 -0400
Subject: [PATCH] [libc++] Defer removal of
_LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR to LLVM 25
Rather than removing the escape hatch in LLVM 24, keep it around for another
release since it hasn't been widely deployed yet. Reword the release note as
an announcement of the future removal in LLVM 25 and update the TODO marker
accordingly.
---
libcxx/docs/ReleaseNotes/24.rst | 6 +++---
libcxx/include/__memory/allocator.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libcxx/docs/ReleaseNotes/24.rst b/libcxx/docs/ReleaseNotes/24.rst
index 70c704ff9d326..89ba314a302f1 100644
--- a/libcxx/docs/ReleaseNotes/24.rst
+++ b/libcxx/docs/ReleaseNotes/24.rst
@@ -60,13 +60,13 @@ Potentially breaking changes
Announcements About Future Releases
-----------------------------------
+- ``std::allocator`` is trivially default constructible since LLVM 22. In LLVM 23 and LLVM 24, the ``_LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR``
+ macro was provided as an escape hatch to revert that change. This escape hatch will be removed in LLVM 25 if there is no
+ evidence of it being useful.
ABI Affecting Changes
---------------------
-- TODO: ``std::allocator`` is trivially default constructible since LLVM 22. In LLVM 23, the ``_LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR``
- macro was provided as an escape hatch, but it has been removed in LLVM 24 since there was no evidence of it being useful.
-
- TODO: ``bitset::operator[]`` returns ``bool`` since LLVM 22, fixing a conformance bug. In LLVM 23, the ``_LIBCPP_DEPRECATED_ABI_BITSET_CONST_SUBSCRIPT_RETURN_REF``
macro was provided as an escape hatch, but it has been removed in LLVM 24 since there was no evidence of it being useful.
diff --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h
index 609b305a1250f..dd8c8647c178a 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -60,7 +60,7 @@ struct __non_trivially_default_constructible_if<true, _Unique> {
template <class _Tp>
class allocator
-// TODO(LLVM 24): Remove the opt-out
+// TODO(LLVM 25): Remove the opt-out
#ifdef _LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR
: __non_trivially_default_constructible_if<!is_void<_Tp>::value, allocator<_Tp> >
#endif
More information about the libcxx-commits
mailing list