[libcxx-commits] [libcxx] 40f2f2f - [libc++] Change linkage for some functions.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Mar 19 11:50:14 PDT 2023


Author: Mark de Wever
Date: 2023-03-19T19:50:05+01:00
New Revision: 40f2f2f55189443a6e55098fb5d3e3656ef07907

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

LOG: [libc++] Change linkage for some functions.

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__algorithm/ranges_find_if.h b/libcxx/include/__algorithm/ranges_find_if.h
index 0b27b8c5dee74..6e2bd4c3ddd4a 100644
--- a/libcxx/include/__algorithm/ranges_find_if.h
+++ b/libcxx/include/__algorithm/ranges_find_if.h
@@ -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)))

diff  --git a/libcxx/include/__algorithm/ranges_min_element.h b/libcxx/include/__algorithm/ranges_min_element.h
index 6f0dec68f9b64..4c58adb3119f8 100644
--- a/libcxx/include/__algorithm/ranges_min_element.h
+++ b/libcxx/include/__algorithm/ranges_min_element.h
@@ -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;


        


More information about the libcxx-commits mailing list