From 867c966c7d1f0c1d60c4b7439182f85fca87f42b Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 27 Apr 2023 13:54:09 -0400 Subject: [PATCH] [libc++] Fix __verbose_abort in C++11 __use() can't be marked as constexpr in C++11 because it returns void, which is not a literal type. But it turns out that we just don't need to define it at all, since it's never called outside of decltype. Differential Revision: https://reviews.llvm.org/D149360 --- libcxx/include/__verbose_abort | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__verbose_abort b/libcxx/include/__verbose_abort index 048d9ff..a38284b 100644 --- a/libcxx/include/__verbose_abort +++ b/libcxx/include/__verbose_abort @@ -47,7 +47,7 @@ void __libcpp_verbose_abort(const char *__format, ...); # if defined(_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT) // The decltype is there to suppress -Wunused warnings in this configuration. -_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR void __use(const char*, ...) { } +void __use(const char*, ...); # define _LIBCPP_VERBOSE_ABORT(...) (decltype(::std::__use(__VA_ARGS__))(), __builtin_abort()) # else # define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__) -- 2.7.4