Skip to content

Commit 1db43b7

Browse files
committed
[libc++] Replace _LIBCPP_INLINE_VISIBILITY and mark all functions _LIBCPP_HIDE_FROM_ABI in __split_buffer
Reviewed By: ldionne, huixie90, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D132028
1 parent c064d3f commit 1db43b7

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

libcxx/include/__split_buffer

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -66,107 +66,107 @@ public:
6666
typedef typename add_lvalue_reference<allocator_type>::type __alloc_ref;
6767
typedef typename add_lvalue_reference<allocator_type>::type __alloc_const_ref;
6868

69-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY __alloc_rr& __alloc() _NOEXCEPT {return __end_cap_.second();}
70-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const __alloc_rr& __alloc() const _NOEXCEPT {return __end_cap_.second();}
71-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY pointer& __end_cap() _NOEXCEPT {return __end_cap_.first();}
72-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const pointer& __end_cap() const _NOEXCEPT {return __end_cap_.first();}
69+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __alloc_rr& __alloc() _NOEXCEPT {return __end_cap_.second();}
70+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const __alloc_rr& __alloc() const _NOEXCEPT {return __end_cap_.second();}
71+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pointer& __end_cap() _NOEXCEPT {return __end_cap_.first();}
72+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const pointer& __end_cap() const _NOEXCEPT {return __end_cap_.first();}
7373

74-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
74+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
7575
__split_buffer()
7676
_NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
77-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
77+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
7878
explicit __split_buffer(__alloc_rr& __a);
79-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
79+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
8080
explicit __split_buffer(const __alloc_rr& __a);
81-
_LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
82-
_LIBCPP_CONSTEXPR_AFTER_CXX17 ~__split_buffer();
81+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
82+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI ~__split_buffer();
8383

84-
_LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c)
84+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c)
8585
_NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
86-
_LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
87-
_LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer& operator=(__split_buffer&& __c)
86+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
87+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __split_buffer& operator=(__split_buffer&& __c)
8888
_NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
8989
is_nothrow_move_assignable<allocator_type>::value) ||
9090
!__alloc_traits::propagate_on_container_move_assignment::value);
9191

92-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator begin() _NOEXCEPT {return __begin_;}
93-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;}
94-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator end() _NOEXCEPT {return __end_;}
95-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT {return __end_;}
92+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT {return __begin_;}
93+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT {return __begin_;}
94+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT {return __end_;}
95+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT {return __end_;}
9696

97-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
97+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
9898
void clear() _NOEXCEPT
9999
{__destruct_at_end(__begin_);}
100-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
101-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty() const {return __end_ == __begin_;}
102-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
103-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
104-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
105-
106-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference front() {return *__begin_;}
107-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference front() const {return *__begin_;}
108-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference back() {return *(__end_ - 1);}
109-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference back() const {return *(__end_ - 1);}
110-
111-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
112-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
113-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void push_front(const_reference __x);
114-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
115-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void push_front(value_type&& __x);
116-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(value_type&& __x);
100+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
101+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool empty() const {return __end_ == __begin_;}
102+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
103+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
104+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
105+
106+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reference front() {return *__begin_;}
107+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reference front() const {return *__begin_;}
108+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI reference back() {return *(__end_ - 1);}
109+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI const_reference back() const {return *(__end_ - 1);}
110+
111+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void reserve(size_type __n);
112+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void shrink_to_fit() _NOEXCEPT;
113+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void push_front(const_reference __x);
114+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void push_back(const_reference __x);
115+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void push_front(value_type&& __x);
116+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void push_back(value_type&& __x);
117117
template <class... _Args>
118-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void emplace_back(_Args&&... __args);
118+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void emplace_back(_Args&&... __args);
119119

120-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
121-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
120+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void pop_front() {__destruct_at_begin(__begin_+1);}
121+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void pop_back() {__destruct_at_end(__end_-1);}
122122

123-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
124-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, const_reference __x);
123+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n);
124+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __construct_at_end(size_type __n, const_reference __x);
125125
template <class _InputIter>
126-
_LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
126+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
127127
__construct_at_end(_InputIter __first, _InputIter __last);
128128
template <class _ForwardIterator>
129-
_LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
129+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
130130
__construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
131131

132-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void __destruct_at_begin(pointer __new_begin)
132+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __destruct_at_begin(pointer __new_begin)
133133
{__destruct_at_begin(__new_begin, is_trivially_destructible<value_type>());}
134-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
134+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
135135
void __destruct_at_begin(pointer __new_begin, false_type);
136-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
136+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
137137
void __destruct_at_begin(pointer __new_begin, true_type);
138138

139-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
139+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
140140
void __destruct_at_end(pointer __new_last) _NOEXCEPT
141141
{__destruct_at_end(__new_last, false_type());}
142-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
142+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
143143
void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
144-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
144+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
145145
void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;
146146

147-
_LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(__split_buffer& __x)
147+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void swap(__split_buffer& __x)
148148
_NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
149149
__is_nothrow_swappable<__alloc_rr>::value);
150150

151-
_LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
151+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool __invariants() const;
152152

153153
private:
154-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
154+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
155155
void __move_assign_alloc(__split_buffer& __c, true_type)
156156
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
157157
{
158158
__alloc() = _VSTD::move(__c.__alloc());
159159
}
160160

161-
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
161+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
162162
void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT
163163
{}
164164

165165
struct _ConstructTransaction {
166-
_LIBCPP_CONSTEXPR_AFTER_CXX17 explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
166+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
167167
: __pos_(*__p), __end_(*__p + __n), __dest_(__p) {
168168
}
169-
_LIBCPP_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
169+
_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI ~_ConstructTransaction() {
170170
*__dest_ = __pos_;
171171
}
172172
pointer __pos_;
@@ -292,7 +292,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_t
292292

293293
template <class _Tp, class _Allocator>
294294
_LIBCPP_CONSTEXPR_AFTER_CXX17
295-
inline _LIBCPP_INLINE_VISIBILITY
295+
inline _LIBCPP_HIDE_FROM_ABI
296296
void
297297
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
298298
{
@@ -302,7 +302,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_typ
302302

303303
template <class _Tp, class _Allocator>
304304
_LIBCPP_CONSTEXPR_AFTER_CXX17
305-
inline _LIBCPP_INLINE_VISIBILITY
305+
inline _LIBCPP_HIDE_FROM_ABI
306306
void
307307
__split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type) _NOEXCEPT
308308
{
@@ -544,7 +544,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
544544

545545
template <class _Tp, class _Allocator>
546546
_LIBCPP_CONSTEXPR_AFTER_CXX17
547-
inline _LIBCPP_INLINE_VISIBILITY
547+
inline _LIBCPP_HIDE_FROM_ABI
548548
void
549549
__split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
550550
{
@@ -638,7 +638,7 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
638638

639639
template <class _Tp, class _Allocator>
640640
_LIBCPP_CONSTEXPR_AFTER_CXX17
641-
inline _LIBCPP_INLINE_VISIBILITY
641+
inline _LIBCPP_HIDE_FROM_ABI
642642
void
643643
swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y)
644644
_NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))

0 commit comments

Comments
 (0)