|
LLVM 22.0.0git
|
This is a MutableArrayRef that owns its array. More...
#include "llvm/ADT/ArrayRef.h"
Public Member Functions | |
| OwningArrayRef ()=default | |
| OwningArrayRef (size_t Size) | |
| OwningArrayRef (ArrayRef< T > Data) | |
| OwningArrayRef (OwningArrayRef &&Other) | |
| OwningArrayRef & | operator= (OwningArrayRef &&Other) |
| ~OwningArrayRef () | |
| Public Member Functions inherited from llvm::MutableArrayRef< T > | |
| MutableArrayRef ()=default | |
| Construct an empty MutableArrayRef. | |
| MutableArrayRef (T &OneElt) | |
| Construct a MutableArrayRef from a single element. | |
| MutableArrayRef (T *data, size_t length) | |
| Construct a MutableArrayRef from a pointer and length. | |
| MutableArrayRef (T *begin, T *end) | |
| Construct a MutableArrayRef from a range. | |
| template<typename C, typename = std::enable_if_t< std::conjunction_v< std::is_convertible< decltype(std::declval<C &>().data()) *, T *const *>, std::is_integral<decltype(std::declval<C &>().size())>> | |
| constexpr | MutableArrayRef (const C &V) |
| Construct a MutableArrayRef from a type that has a data() method that returns a pointer convertible to T *. | |
| template<size_t N> | |
| constexpr | MutableArrayRef (T(&Arr)[N]) |
| Construct a MutableArrayRef from a C array. | |
| T * | data () const |
| iterator | begin () const |
| iterator | end () const |
| reverse_iterator | rbegin () const |
| reverse_iterator | rend () const |
| T & | front () const |
| front - Get the first element. | |
| T & | back () const |
| back - Get the last element. | |
| T & | consume_front () |
| consume_front() - Returns the first element and drops it from ArrayRef. | |
| T & | consume_back () |
| consume_back() - Returns the last element and drops it from ArrayRef. | |
| MutableArrayRef< T > | slice (size_t N, size_t M) const |
| slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array. | |
| MutableArrayRef< T > | slice (size_t N) const |
| slice(n) - Chop off the first N elements of the array. | |
| MutableArrayRef< T > | drop_front (size_t N=1) const |
Drop the first N elements of the array. | |
| MutableArrayRef< T > | drop_back (size_t N=1) const |
| template<class PredicateT> | |
| MutableArrayRef< T > | drop_while (PredicateT Pred) const |
| Return a copy of *this with the first N elements satisfying the given predicate removed. | |
| template<class PredicateT> | |
| MutableArrayRef< T > | drop_until (PredicateT Pred) const |
| Return a copy of *this with the first N elements not satisfying the given predicate removed. | |
| MutableArrayRef< T > | take_front (size_t N=1) const |
Return a copy of *this with only the first N elements. | |
| MutableArrayRef< T > | take_back (size_t N=1) const |
Return a copy of *this with only the last N elements. | |
| template<class PredicateT> | |
| MutableArrayRef< T > | take_while (PredicateT Pred) const |
| Return the first N elements of this Array that satisfy the given predicate. | |
| template<class PredicateT> | |
| MutableArrayRef< T > | take_until (PredicateT Pred) const |
| Return the first N elements of this Array that don't satisfy the given predicate. | |
| T & | operator[] (size_t Index) const |
| Public Member Functions inherited from llvm::ArrayRef< T > | |
| ArrayRef ()=default | |
| Construct an empty ArrayRef. | |
| LLVM_DEPRECATED ("Use {} or ArrayRef<T>() instead", "{}") ArrayRef(std | |
| Construct an empty ArrayRef from std::nullopt. | |
| ArrayRef (const T &OneElt LLVM_LIFETIME_BOUND) | |
| Construct an ArrayRef from a single element. | |
| constexpr | ArrayRef (const T *data LLVM_LIFETIME_BOUND, size_t length) |
| Construct an ArrayRef from a pointer and length. | |
| constexpr | ArrayRef (const T *begin LLVM_LIFETIME_BOUND, const T *end) |
| Construct an ArrayRef from a range. | |
| template<typename C, typename = std::enable_if_t< std::conjunction_v< std::is_convertible< decltype(std::declval<const C &>().data()) *, const T *const *>, std::is_integral<decltype(std::declval<const C &>().size())>> | |
| constexpr | ArrayRef (const C &V) |
| Construct an ArrayRef from a type that has a data() method that returns a pointer convertible to const T *. | |
| template<size_t N> | |
| constexpr | ArrayRef (const T(&Arr LLVM_LIFETIME_BOUND)[N]) |
| Construct an ArrayRef from a C array. | |
| constexpr | ArrayRef (std::initializer_list< T > Vec LLVM_LIFETIME_BOUND) |
| Construct an ArrayRef from a std::initializer_list. | |
| template<typename U, typename = std::enable_if_t< std::is_convertible_v<U *const *, T *const *>>> | |
| ArrayRef (const iterator_range< U * > &Range) | |
| Construct an ArrayRef<T> from iterator_range<U*>. | |
| iterator | begin () const |
| iterator | end () const |
| reverse_iterator | rbegin () const |
| reverse_iterator | rend () const |
| bool | empty () const |
| empty - Check if the array is empty. | |
| const T * | data () const |
| size_t | size () const |
| size - Get the array size. | |
| const T & | front () const |
| front - Get the first element. | |
| const T & | back () const |
| back - Get the last element. | |
| const T & | consume_front () |
| consume_front() - Returns the first element and drops it from ArrayRef. | |
| const T & | consume_back () |
| consume_back() - Returns the last element and drops it from ArrayRef. | |
| template<typename Allocator> | |
| MutableArrayRef< T > | copy (Allocator &A) |
| bool | equals (ArrayRef RHS) const |
| equals - Check for element-wise equality. | |
| ArrayRef< T > | slice (size_t N, size_t M) const |
| slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array. | |
| ArrayRef< T > | slice (size_t N) const |
| slice(n) - Chop off the first N elements of the array. | |
| ArrayRef< T > | drop_front (size_t N=1) const |
Drop the first N elements of the array. | |
| ArrayRef< T > | drop_back (size_t N=1) const |
Drop the last N elements of the array. | |
| template<class PredicateT> | |
| ArrayRef< T > | drop_while (PredicateT Pred) const |
| Return a copy of *this with the first N elements satisfying the given predicate removed. | |
| template<class PredicateT> | |
| ArrayRef< T > | drop_until (PredicateT Pred) const |
| Return a copy of *this with the first N elements not satisfying the given predicate removed. | |
| ArrayRef< T > | take_front (size_t N=1) const |
Return a copy of *this with only the first N elements. | |
| ArrayRef< T > | take_back (size_t N=1) const |
Return a copy of *this with only the last N elements. | |
| template<class PredicateT> | |
| ArrayRef< T > | take_while (PredicateT Pred) const |
| Return the first N elements of this Array that satisfy the given predicate. | |
| template<class PredicateT> | |
| ArrayRef< T > | take_until (PredicateT Pred) const |
| Return the first N elements of this Array that don't satisfy the given predicate. | |
| const T & | operator[] (size_t Index) const |
| template<typename U> | |
| std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & | operator= (U &&Temporary)=delete |
| Disallow accidental assignment from a temporary. | |
| template<typename U> | |
| std::enable_if_t< std::is_same< U, T >::value, ArrayRef< T > > & | operator= (std::initializer_list< U >)=delete |
| Disallow accidental assignment from a temporary. | |
| std::vector< T > | vec () const |
| operator std::vector< T > () const | |
Additional Inherited Members | |
| Public Types inherited from llvm::MutableArrayRef< T > | |
| using | value_type = T |
| using | pointer = value_type * |
| using | const_pointer = const value_type * |
| using | reference = value_type & |
| using | const_reference = const value_type & |
| using | iterator = pointer |
| using | const_iterator = const_pointer |
| using | reverse_iterator = std::reverse_iterator<iterator> |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
| using | size_type = size_t |
| using | difference_type = ptrdiff_t |
| Public Types inherited from llvm::ArrayRef< T > | |
| using | value_type = T |
| using | pointer = value_type * |
| using | const_pointer = const value_type * |
| using | reference = value_type & |
| using | const_reference = const value_type & |
| using | iterator = const_pointer |
| using | const_iterator = const_pointer |
| using | reverse_iterator = std::reverse_iterator<iterator> |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
| using | size_type = size_t |
| using | difference_type = ptrdiff_t |
This is a MutableArrayRef that owns its array.
Definition at line 454 of file ArrayRef.h.
|
default |
Referenced by operator=(), and OwningArrayRef().
|
inline |
Definition at line 457 of file ArrayRef.h.
References llvm::MutableArrayRef< T >::MutableArrayRef(), Size, and T.
|
inline |
Definition at line 459 of file ArrayRef.h.
References llvm::MutableArrayRef< T >::MutableArrayRef(), llvm::ArrayRef< T >::size(), and T.
|
inline |
Definition at line 464 of file ArrayRef.h.
References llvm::Other, and OwningArrayRef().
|
inline |
Definition at line 473 of file ArrayRef.h.
References data.
|
inline |
Definition at line 466 of file ArrayRef.h.
References data, llvm::MutableArrayRef(), llvm::ArrayRef< T >::operator=(), llvm::Other, OwningArrayRef(), and T.