[libcxx-commits] [libcxx] aaef3b8 - [libc++] Remove _LIBCPP_CONSTEVAL

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 11 09:34:46 PST 2023


Author: Nikolas Klauser
Date: 2023-02-11T18:34:40+01:00
New Revision: aaef3b82f4f0dd3924a3491b381d5015ff472b86

URL: https://github.com/llvm/llvm-project/commit/aaef3b82f4f0dd3924a3491b381d5015ff472b86
DIFF: https://github.com/llvm/llvm-project/commit/aaef3b82f4f0dd3924a3491b381d5015ff472b86.diff

LOG: [libc++] Remove _LIBCPP_CONSTEVAL

All supported compilers support `consteval`, so there is no more need for the macro.

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D143489

Added: 
    

Modified: 
    libcxx/.clang-format
    libcxx/include/__compare/ordering.h
    libcxx/include/__config

Removed: 
    


################################################################################
diff  --git a/libcxx/.clang-format b/libcxx/.clang-format
index 77ffa23435cc0..980f881eac5de 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -37,7 +37,6 @@ AttributeMacros: ['_LIBCPP_HIDE_FROM_ABI',
                   '_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
                   '_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
                   '_LIBCPP_INLINE_VISIBILITY',
-                  '_LIBCPP_CONSTEVAL',
                   '_LIBCPP_NOALIAS',
                   '_LIBCPP_USING_IF_EXISTS',
                   '_LIBCPP_DEPRECATED',

diff  --git a/libcxx/include/__compare/ordering.h b/libcxx/include/__compare/ordering.h
index ff148abf234fb..572a15cf3485e 100644
--- a/libcxx/include/__compare/ordering.h
+++ b/libcxx/include/__compare/ordering.h
@@ -40,7 +40,7 @@ template<class _Tp, class... _Args>
 inline constexpr bool __one_of_v = (is_same_v<_Tp, _Args> || ...);
 
 struct _CmpUnspecifiedParam {
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEVAL
+  _LIBCPP_HIDE_FROM_ABI consteval
   _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {}
 
   template<class _Tp, class = enable_if_t<!__one_of_v<_Tp, int, partial_ordering, weak_ordering, strong_ordering>>>

diff  --git a/libcxx/include/__config b/libcxx/include/__config
index be15ce2457ac9..f9c8158280b01 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -686,12 +686,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 #    define _LIBCPP_HAS_NO_INT128
 #  endif
 
-#  ifndef __cpp_consteval
-#    define _LIBCPP_CONSTEVAL _LIBCPP_CONSTEXPR
-#  else
-#    define _LIBCPP_CONSTEVAL consteval
-#  endif
-
 #  if __has_attribute(__malloc__)
 #    define _LIBCPP_NOALIAS __attribute__((__malloc__))
 #  else


        


More information about the libcxx-commits mailing list