summaryrefslogtreecommitdiffstats
path: root/libcxx/include/vector
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-05-22 16:20:28 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-05-22 16:20:28 +0000
commit85d26075f9571f15977c41a665cc8a72841b49e5 (patch)
tree7e7732a006d055495f613f13d1de150196b2f8ea /libcxx/include/vector
parentf1894fe37e568721afbdd45be5268190a8f88d79 (diff)
downloadbcm5719-llvm-85d26075f9571f15977c41a665cc8a72841b49e5.tar.gz
bcm5719-llvm-85d26075f9571f15977c41a665cc8a72841b49e5.zip
Change the names of two private methods: allocate -> __vallocate and deallocate -> __vdeallocate. NFC. This change triggered by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61806, which shows up when we implement deduction guides for the container adaptors.The names have a 'v' in them because WIN32 has a macro named __deallocate. (sigh).
llvm-svn: 332996
Diffstat (limited to 'libcxx/include/vector')
-rw-r--r--libcxx/include/vector82
1 files changed, 41 insertions, 41 deletions
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 8fad9ec5483..9e399bdd1f4 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -781,8 +781,8 @@ public:
private:
_LIBCPP_INLINE_VISIBILITY void __invalidate_all_iterators();
_LIBCPP_INLINE_VISIBILITY void __invalidate_iterators_past(pointer __new_last);
- void allocate(size_type __n);
- void deallocate() _NOEXCEPT;
+ void __vallocate(size_type __n);
+ void __vdeallocate() _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const;
void __construct_at_end(size_type __n);
_LIBCPP_INLINE_VISIBILITY
@@ -951,7 +951,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
// Postcondition: size() == 0
template <class _Tp, class _Allocator>
void
-vector<_Tp, _Allocator>::allocate(size_type __n)
+vector<_Tp, _Allocator>::__vallocate(size_type __n)
{
if (__n > max_size())
this->__throw_length_error();
@@ -962,7 +962,7 @@ vector<_Tp, _Allocator>::allocate(size_type __n)
template <class _Tp, class _Allocator>
void
-vector<_Tp, _Allocator>::deallocate() _NOEXCEPT
+vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT
{
if (this->__begin_ != nullptr)
{
@@ -1098,7 +1098,7 @@ vector<_Tp, _Allocator>::vector(size_type __n)
#endif
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n);
}
}
@@ -1113,7 +1113,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
#endif
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n);
}
}
@@ -1127,7 +1127,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
#endif
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n, __x);
}
}
@@ -1141,7 +1141,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x, const allo
#endif
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n, __x);
}
}
@@ -1195,7 +1195,7 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__first, __last, __n);
}
}
@@ -1215,7 +1215,7 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__first, __last, __n);
}
}
@@ -1230,7 +1230,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x)
size_type __n = __x.size();
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__x.__begin_, __x.__end_, __n);
}
}
@@ -1245,7 +1245,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
size_type __n = __x.size();
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__x.__begin_, __x.__end_, __n);
}
}
@@ -1306,7 +1306,7 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
#endif
if (__il.size() > 0)
{
- allocate(__il.size());
+ __vallocate(__il.size());
__construct_at_end(__il.begin(), __il.end(), __il.size());
}
}
@@ -1321,7 +1321,7 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
#endif
if (__il.size() > 0)
{
- allocate(__il.size());
+ __vallocate(__il.size());
__construct_at_end(__il.begin(), __il.end(), __il.size());
}
}
@@ -1356,7 +1356,7 @@ void
vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
- deallocate();
+ __vdeallocate();
__base::__move_assign_alloc(__c); // this can throw
this->__begin_ = __c.__begin_;
this->__end_ = __c.__end_;
@@ -1431,8 +1431,8 @@ vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __las
}
else
{
- deallocate();
- allocate(__recommend(__new_size));
+ __vdeallocate();
+ __vallocate(__recommend(__new_size));
__construct_at_end(__first, __last, __new_size);
}
__invalidate_all_iterators();
@@ -1453,8 +1453,8 @@ vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
}
else
{
- deallocate();
- allocate(__recommend(static_cast<size_type>(__n)));
+ __vdeallocate();
+ __vallocate(__recommend(static_cast<size_type>(__n)));
__construct_at_end(__n, __u);
}
__invalidate_all_iterators();
@@ -2437,8 +2437,8 @@ public:
private:
_LIBCPP_INLINE_VISIBILITY void __invalidate_all_iterators();
- void allocate(size_type __n);
- void deallocate() _NOEXCEPT;
+ void __vallocate(size_type __n);
+ void __vdeallocate() _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
static size_type __align_it(size_type __new_size) _NOEXCEPT
{return __new_size + (__bits_per_word-1) & ~((size_type)__bits_per_word-1);};
@@ -2476,7 +2476,7 @@ private:
void __copy_assign_alloc(const vector& __c, true_type)
{
if (__alloc() != __c.__alloc())
- deallocate();
+ __vdeallocate();
__alloc() = __c.__alloc();
}
@@ -2532,7 +2532,7 @@ vector<bool, _Allocator>::__invalidate_all_iterators()
// Postcondition: size() == 0
template <class _Allocator>
void
-vector<bool, _Allocator>::allocate(size_type __n)
+vector<bool, _Allocator>::__vallocate(size_type __n)
{
if (__n > max_size())
this->__throw_length_error();
@@ -2544,7 +2544,7 @@ vector<bool, _Allocator>::allocate(size_type __n)
template <class _Allocator>
void
-vector<bool, _Allocator>::deallocate() _NOEXCEPT
+vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT
{
if (this->__begin_ != nullptr)
{
@@ -2641,7 +2641,7 @@ vector<bool, _Allocator>::vector(size_type __n)
{
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n, false);
}
}
@@ -2655,7 +2655,7 @@ vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
{
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n, false);
}
}
@@ -2669,7 +2669,7 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
{
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n, __x);
}
}
@@ -2682,7 +2682,7 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const all
{
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__n, __x);
}
}
@@ -2752,7 +2752,7 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__first, __last);
}
}
@@ -2768,7 +2768,7 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__first, __last);
}
}
@@ -2784,7 +2784,7 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
size_type __n = static_cast<size_type>(__il.size());
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__il.begin(), __il.end());
}
}
@@ -2798,7 +2798,7 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const alloca
size_type __n = static_cast<size_type>(__il.size());
if (__n > 0)
{
- allocate(__n);
+ __vallocate(__n);
__construct_at_end(__il.begin(), __il.end());
}
}
@@ -2821,7 +2821,7 @@ vector<bool, _Allocator>::vector(const vector& __v)
{
if (__v.size() > 0)
{
- allocate(__v.size());
+ __vallocate(__v.size());
__construct_at_end(__v.begin(), __v.end());
}
}
@@ -2834,7 +2834,7 @@ vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
{
if (__v.size() > 0)
{
- allocate(__v.size());
+ __vallocate(__v.size());
__construct_at_end(__v.begin(), __v.end());
}
}
@@ -2850,8 +2850,8 @@ vector<bool, _Allocator>::operator=(const vector& __v)
{
if (__v.__size_ > capacity())
{
- deallocate();
- allocate(__v.__size_);
+ __vdeallocate();
+ __vallocate(__v.__size_);
}
_VSTD::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_);
}
@@ -2895,7 +2895,7 @@ vector<bool, _Allocator>::vector(vector&& __v, const allocator_type& __a)
}
else if (__v.size() > 0)
{
- allocate(__v.size());
+ __vallocate(__v.size());
__construct_at_end(__v.begin(), __v.end());
}
}
@@ -2926,7 +2926,7 @@ void
vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
- deallocate();
+ __vdeallocate();
__move_assign_alloc(__c);
this->__begin_ = __c.__begin_;
this->__size_ = __c.__size_;
@@ -2991,8 +2991,8 @@ vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __la
{
if (__n > capacity())
{
- deallocate();
- allocate(__n);
+ __vdeallocate();
+ __vallocate(__n);
}
__construct_at_end(__first, __last);
}
@@ -3005,7 +3005,7 @@ vector<bool, _Allocator>::reserve(size_type __n)
if (__n > capacity())
{
vector __v(this->__alloc());
- __v.allocate(__n);
+ __v.__vallocate(__n);
__v.__construct_at_end(this->begin(), this->end());
swap(__v);
__invalidate_all_iterators();
OpenPOWER on IntegriCloud