From c6b12b7c3bc81266e8becbcccf0eaf4622db0cd0 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 9 Mar 2023 12:26:39 -0500 Subject: [PATCH] [libc++] Remove _LIBCPP_CONSTEVAL It was only used in one place, and it seems entirely valid to use constexpr unconditionally in that location. Note that a different change was attempted, i.e. using consteval unconditionally. However, this led to http://llvm.org/PR60709. Differential Revision: https://reviews.llvm.org/D145700 --- libcxx/.clang-format | 1 - libcxx/include/__compare/ordering.h | 2 +- libcxx/include/__config | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/libcxx/.clang-format b/libcxx/.clang-format index 68180bbef4c8..acf987dbe886 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 c87871decc08..c348f0433a32 100644 --- a/libcxx/include/__compare/ordering.h +++ b/libcxx/include/__compare/ordering.h @@ -40,7 +40,7 @@ template inline constexpr bool __one_of_v = (is_same_v<_Tp, _Args> || ...); struct _CmpUnspecifiedParam { - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEVAL + _LIBCPP_HIDE_FROM_ABI constexpr _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {} template>> diff --git a/libcxx/include/__config b/libcxx/include/__config index 272ed28fc0f6..3d3664eb83ae 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -695,12 +695,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