Skip to content

Commit

Permalink
[libc++] Add a bunch of missing _LIBCPP_HIDE_FROM_ABI
Browse files Browse the repository at this point in the history
Reviewed By: ldionne, Mordante, var-const, huixie90, #libc

Spies: jloser, libcxx-commits, arichardson, miyuki

Differential Revision: https://reviews.llvm.org/D129968
  • Loading branch information
philnik777 committed Aug 13, 2022
1 parent f159695 commit 80c7e93
Show file tree
Hide file tree
Showing 94 changed files with 668 additions and 319 deletions.
9 changes: 9 additions & 0 deletions libcxx/docs/TestingLibcxx.rst
Expand Up @@ -92,6 +92,15 @@ configuration easier.
$ make -C <build> cxx-test-depends
$ <build>/bin/llvm-lit -sv libcxx/test # will use your custom config file
Additional tools
----------------

The libc++ test suite uses a few optional tools to improve the code quality.

These tools are:
- clang-query
- clang-tidy

Writing Tests
-------------

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__algorithm/find_end.h
Expand Up @@ -91,7 +91,7 @@ template <
class _Sent2,
class _Proj1,
class _Proj2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
Expand Down Expand Up @@ -144,7 +144,7 @@ template <
class _Sent2,
class _Proj1,
class _Proj2>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
_Iter1 __first1,
_Sent1 __sent1,
_Iter2 __first2,
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__algorithm/find_first_of.h
Expand Up @@ -21,6 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
_ForwardIterator1 __last1,
_ForwardIterator2 __first2,
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/__algorithm/inplace_merge.h
Expand Up @@ -56,6 +56,7 @@ class __invert // invert the sense of a comparison

template <class _AlgPolicy, class _Compare, class _InputIterator1, class _Sent1,
class _InputIterator2, class _Sent2, class _OutputIterator>
_LIBCPP_HIDE_FROM_ABI
void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
_InputIterator2 __first2, _Sent2 __last2,
_OutputIterator __result, _Compare&& __comp)
Expand Down Expand Up @@ -83,6 +84,7 @@ void __half_inplace_merge(_InputIterator1 __first1, _Sent1 __last1,
}

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __buffered_inplace_merge(
_BidirectionalIterator __first,
_BidirectionalIterator __middle,
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/is_partitioned.h
Expand Up @@ -18,7 +18,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
{
for (; __first != __last; ++__first)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/lexicographical_compare.h
Expand Up @@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _InputIterator1, class _InputIterator2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
__lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
{
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/merge.h
Expand Up @@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
_OutputIterator
__merge(_InputIterator1 __first1, _InputIterator1 __last1,
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/minmax_element.h
Expand Up @@ -79,7 +79,7 @@ pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __c
}

template <class _ForwardIterator, class _Compare>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
pair<_ForwardIterator, _ForwardIterator>
minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
Expand Down
3 changes: 1 addition & 2 deletions libcxx/include/__algorithm/next_permutation.h
Expand Up @@ -25,8 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
pair<_BidirectionalIterator, bool>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, bool>
__next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
using _Result = pair<_BidirectionalIterator, bool>;
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__algorithm/nth_element.h
Expand Up @@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template<class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 bool
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 bool
__nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
_RandomAccessIterator __m, _Compare __comp)
{
Expand All @@ -42,7 +42,7 @@ __nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
__nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
{
using _Ops = _IterOps<_AlgPolicy>;
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__algorithm/partial_sort.h
Expand Up @@ -29,7 +29,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
_RandomAccessIterator __partial_sort_impl(
_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
if (__first == __middle) {
Expand All @@ -55,7 +55,7 @@ _RandomAccessIterator __partial_sort_impl(
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
_RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last,
_Compare& __comp) {
if (__first == __middle)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/partial_sort_copy.h
Expand Up @@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _AlgPolicy, class _Compare,
class _InputIterator, class _Sentinel1, class _RandomAccessIterator, class _Sentinel2,
class _Proj1, class _Proj2>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
__partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
_RandomAccessIterator __result_first, _Sentinel2 __result_last,
_Compare&& __comp, _Proj1&& __proj1, _Proj2&& __proj2)
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__algorithm/partition.h
Expand Up @@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
__partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag)
{
while (true)
Expand All @@ -48,7 +48,7 @@ __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred,
}

template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
__partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred,
bidirectional_iterator_tag)
{
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/partition_copy.h
Expand Up @@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD

template <class _InputIterator, class _OutputIterator1,
class _OutputIterator2, class _Predicate>
_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
partition_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator1 __out_true, _OutputIterator2 __out_false,
_Predicate __pred)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/partition_point.h
Expand Up @@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template<class _ForwardIterator, class _Predicate>
_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
typedef typename iterator_traits<_ForwardIterator>::difference_type difference_type;
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/prev_permutation.h
Expand Up @@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
_LIBCPP_CONSTEXPR_AFTER_CXX17
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
pair<_BidirectionalIterator, bool>
__prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
{
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/remove.h
Expand Up @@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Tp>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
{
__first = _VSTD::find(__first, __last, __value);
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/remove_if.h
Expand Up @@ -20,7 +20,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _ForwardIterator, class _Predicate>
_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
{
__first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/__algorithm/rotate.h
Expand Up @@ -26,7 +26,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _ForwardIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
__rotate_left(_ForwardIterator __first, _ForwardIterator __last)
{
typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
Expand All @@ -40,7 +40,7 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
}

template <class _AlgPolicy, class _BidirectionalIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
__rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
{
typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
Expand All @@ -54,7 +54,7 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
}

template <class _AlgPolicy, class _ForwardIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
__rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
{
_ForwardIterator __i = __middle;
Expand Down Expand Up @@ -103,7 +103,7 @@ __algo_gcd(_Integral __x, _Integral __y)
}

template <class _AlgPolicy, typename _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
__rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
Expand Down
10 changes: 5 additions & 5 deletions libcxx/include/__algorithm/shuffle.h
Expand Up @@ -93,7 +93,7 @@ class _LIBCPP_TYPE_VIS __rs_default
_LIBCPP_FUNC_VIS __rs_default __rs_get();

template <class _RandomAccessIterator>
_LIBCPP_DEPRECATED_IN_CXX14 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
{
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
Expand All @@ -114,7 +114,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
}

template <class _RandomAccessIterator, class _RandomNumberGenerator>
_LIBCPP_DEPRECATED_IN_CXX14 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#ifndef _LIBCPP_CXX03_LANG
_RandomNumberGenerator&& __rand)
Expand All @@ -137,7 +137,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
#endif

template <class _AlgPolicy, class _RandomAccessIterator, class _Sentinel, class _UniformRandomNumberGenerator>
_RandomAccessIterator __shuffle(
_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator __shuffle(
_RandomAccessIterator __first, _Sentinel __last_sentinel, _UniformRandomNumberGenerator&& __g) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef uniform_int_distribution<ptrdiff_t> _Dp;
Expand All @@ -161,8 +161,8 @@ _RandomAccessIterator __shuffle(
}

template <class _RandomAccessIterator, class _UniformRandomNumberGenerator>
void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
_UniformRandomNumberGenerator&& __g) {
_LIBCPP_HIDE_FROM_ABI void
shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _UniformRandomNumberGenerator&& __g) {
(void)std::__shuffle<_ClassicAlgPolicy>(
std::move(__first), std::move(__last), std::forward<_UniformRandomNumberGenerator>(__g));
}
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__algorithm/sift_down.h
Expand Up @@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 void
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
__sift_down(_RandomAccessIterator __first, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len,
_RandomAccessIterator __start)
Expand Down Expand Up @@ -78,7 +78,7 @@ __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
__floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
typename iterator_traits<_RandomAccessIterator>::difference_type __len)
{
Expand Down
10 changes: 8 additions & 2 deletions libcxx/include/__algorithm/sort.h
Expand Up @@ -80,6 +80,7 @@ struct _UnwrapAlgPolicy<_WrapAlgPolicy<_Ts...> > {
// stable, 2-3 compares, 0-2 swaps

template <class _AlgPolicy, class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
_Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
Expand Down Expand Up @@ -118,6 +119,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIte
// stable, 3-6 compares, 0-5 swaps

template <class _AlgPolicy, class _Compare, class _ForwardIterator>
_LIBCPP_HIDE_FROM_ABI
unsigned __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4,
_Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
Expand Down Expand Up @@ -281,6 +283,7 @@ __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2,

// Assumes size > 0
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
_Compare __comp) {
_BidirectionalIterator __lm1 = __last;
Expand All @@ -292,6 +295,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __fir
}

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;

Expand All @@ -309,6 +313,7 @@ void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __l
}

template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;

Expand All @@ -332,7 +337,7 @@ void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __l
}

template <class _WrappedComp, class _RandomAccessIterator>
bool __insertion_sort_incomplete(
_LIBCPP_HIDDEN bool __insertion_sort_incomplete(
_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
using _Unwrap = _UnwrapAlgPolicy<_WrappedComp>;
using _AlgPolicy = typename _Unwrap::_AlgPolicy;
Expand Down Expand Up @@ -387,6 +392,7 @@ bool __insertion_sort_incomplete(
}

template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI
void __insertion_sort_move(_BidirectionalIterator __first1, _BidirectionalIterator __last1,
typename iterator_traits<_BidirectionalIterator>::value_type* __first2, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
Expand Down Expand Up @@ -616,7 +622,7 @@ inline _LIBCPP_HIDE_FROM_ABI _Number __log2i(_Number __n) {
}

template <class _WrappedComp, class _RandomAccessIterator>
void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
_LIBCPP_HIDDEN void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _WrappedComp __wrapped_comp) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __depth_limit = 2 * __log2i(__last - __first);

Expand Down
6 changes: 3 additions & 3 deletions libcxx/include/__algorithm/stable_partition.h
Expand Up @@ -25,7 +25,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD

template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Distance, class _Pair>
_ForwardIterator
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
_Distance __len, _Pair __p, forward_iterator_tag __fit)
{
Expand Down Expand Up @@ -114,7 +114,7 @@ __stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Pred
}

template <class _AlgPolicy, class _Predicate, class _ForwardIterator>
_ForwardIterator
_LIBCPP_HIDE_FROM_ABI _ForwardIterator
__stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
forward_iterator_tag)
{
Expand Down Expand Up @@ -259,7 +259,7 @@ __stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator _
}

template <class _AlgPolicy, class _Predicate, class _BidirectionalIterator>
_BidirectionalIterator
_LIBCPP_HIDE_FROM_ABI _BidirectionalIterator
__stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred,
bidirectional_iterator_tag)
{
Expand Down

0 comments on commit 80c7e93

Please sign in to comment.