mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-23 19:59:57 +00:00
ArrayRef reverse iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f0a4e1aad
commit
827de0520e
@ -33,6 +33,8 @@ namespace llvm {
|
|||||||
typedef const T *const_iterator;
|
typedef const T *const_iterator;
|
||||||
typedef size_t size_type;
|
typedef size_t size_type;
|
||||||
|
|
||||||
|
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The start of the array, in an external buffer.
|
/// The start of the array, in an external buffer.
|
||||||
const T *Data;
|
const T *Data;
|
||||||
@ -84,6 +86,9 @@ namespace llvm {
|
|||||||
iterator begin() const { return Data; }
|
iterator begin() const { return Data; }
|
||||||
iterator end() const { return Data + Length; }
|
iterator end() const { return Data + Length; }
|
||||||
|
|
||||||
|
reverse_iterator rbegin() const { return reverse_iterator(end()); }
|
||||||
|
reverse_iterator rend() const { return reverse_iterator(begin()); }
|
||||||
|
|
||||||
/// empty - Check if the array is empty.
|
/// empty - Check if the array is empty.
|
||||||
bool empty() const { return Length == 0; }
|
bool empty() const { return Length == 0; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user