[libc++] Change linkage for some functions.
authorMark de Wever <koraq@xs4all.nl>
Sun, 19 Mar 2023 17:06:47 +0000 (18:06 +0100)
committerMark de Wever <koraq@xs4all.nl>
Sun, 19 Mar 2023 18:50:05 +0000 (19:50 +0100)
Internal linkages fails when building libc++ with modules. Using
internal linkage is headers seems questionable to change the linkage.

Reviewed By: #libc, philnik

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

libcxx/include/__algorithm/ranges_find_if.h
libcxx/include/__algorithm/ranges_min_element.h

index 0b27b8c..6e2bd4c 100644 (file)
@@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace ranges {
 
 template <class _Ip, class _Sp, class _Pred, class _Proj>
-_LIBCPP_HIDE_FROM_ABI static constexpr
+_LIBCPP_HIDE_FROM_ABI constexpr
 _Ip __find_if_impl(_Ip __first, _Sp __last, _Pred& __pred, _Proj& __proj) {
   for (; __first != __last; ++__first) {
     if (std::invoke(__pred, std::invoke(__proj, *__first)))
index 6f0dec6..4c58adb 100644 (file)
@@ -32,7 +32,7 @@ namespace ranges {
 
 // TODO(ranges): `ranges::min_element` can now simply delegate to `std::__min_element`.
 template <class _Ip, class _Sp, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI static constexpr
+_LIBCPP_HIDE_FROM_ABI constexpr
 _Ip __min_element_impl(_Ip __first, _Sp __last, _Comp& __comp, _Proj& __proj) {
   if (__first == __last)
     return __first;