[libcxx-commits] [libcxx] [libc++] Defer removal of _LIBCPP_DEPRECATED_ABI_NON_TRIVIAL_ALLOCATOR to LLVM 25 (PR #211553)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 23 06:16:33 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/211553.diff


2 Files Affected:

- (modified) libcxx/docs/ReleaseNotes/24.rst (+3-3) 
- (modified) libcxx/include/__memory/allocator.h (+1-1) 


``````````diff
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/211553


More information about the libcxx-commits mailing list