Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2026 14:18:36 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3ac42330b1da - main - Revert "libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:"
Message-ID:  <69eccd3c.3771d.d496602@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=3ac42330b1da72d68cc6d7c3f65e24a882ccfd47

commit 3ac42330b1da72d68cc6d7c3f65e24a882ccfd47
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-12-06 20:24:15 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-04-25 14:07:41 +0000

    Revert "libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:"
    
    This reverts commit 267fa9ab814c23ca97b8b7e1740f4da51485ac72, in
    preparation for merging llvm 21.
    
    PR:             292067
    MFC after:      1 month
---
 .../libcxx/include/__type_traits/remove_reference.h        | 14 +++++++-------
 contrib/llvm-project/libcxx/include/cwchar                 |  4 ++++
 contrib/llvm-project/libcxx/include/execution              |  4 ++++
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h
index fd66417bd84f..ba67891758ad 100644
--- a/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h
+++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_reference.h
@@ -10,7 +10,6 @@
 #define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
 
 #include <__config>
-#include <cstddef>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
@@ -26,15 +25,16 @@ struct remove_reference {
 
 template <class _Tp>
 using __libcpp_remove_reference_t = __remove_reference_t(_Tp);
-#else
-// clang-format off
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference        {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&>  {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;};
-// clang-format on
+#elif __has_builtin(__remove_reference)
+template <class _Tp>
+struct remove_reference {
+  using type _LIBCPP_NODEBUG = __remove_reference(_Tp);
+};
 
 template <class _Tp>
 using __libcpp_remove_reference_t = typename remove_reference<_Tp>::type;
+#else
+#  error "remove_reference not implemented!"
 #endif // __has_builtin(__remove_reference_t)
 
 #if _LIBCPP_STD_VER >= 14
diff --git a/contrib/llvm-project/libcxx/include/cwchar b/contrib/llvm-project/libcxx/include/cwchar
index 7abcc3440947..dd16eaeaa07f 100644
--- a/contrib/llvm-project/libcxx/include/cwchar
+++ b/contrib/llvm-project/libcxx/include/cwchar
@@ -258,4 +258,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __constexpr_wmemchr(_Tp
 
 _LIBCPP_END_NAMESPACE_STD
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <cstddef>
+#endif
+
 #endif // _LIBCPP_CWCHAR
diff --git a/contrib/llvm-project/libcxx/include/execution b/contrib/llvm-project/libcxx/include/execution
index 822ffa1fd3eb..94d434b2e460 100644
--- a/contrib/llvm-project/libcxx/include/execution
+++ b/contrib/llvm-project/libcxx/include/execution
@@ -142,4 +142,8 @@ _LIBCPP_END_NAMESPACE_STD
 
 #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_PSTL) && _LIBCPP_STD_VER >= 17
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+#  include <cstddef>
+#endif
+
 #endif // _LIBCPP_EXECUTION


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eccd3c.3771d.d496602>