mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
Add operator- to Path's reverse_iterator. Needed for D19666
Reviewers: rafael, craig.topper, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19724 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268062 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6881bc84c4
commit
034b92a7c3
@ -87,6 +87,9 @@ public:
|
||||
reverse_iterator &operator++(); // preincrement
|
||||
bool operator==(const reverse_iterator &RHS) const;
|
||||
bool operator!=(const reverse_iterator &RHS) const { return !(*this == RHS); }
|
||||
|
||||
/// @brief Difference in bytes between this and RHS.
|
||||
ptrdiff_t operator-(const reverse_iterator &RHS) const;
|
||||
};
|
||||
|
||||
/// @brief Get begin iterator over \a path.
|
||||
|
@ -353,6 +353,10 @@ bool reverse_iterator::operator==(const reverse_iterator &RHS) const {
|
||||
Position == RHS.Position;
|
||||
}
|
||||
|
||||
ptrdiff_t reverse_iterator::operator-(const reverse_iterator &RHS) const {
|
||||
return Position - RHS.Position;
|
||||
}
|
||||
|
||||
StringRef root_path(StringRef path) {
|
||||
const_iterator b = begin(path),
|
||||
pos = b,
|
||||
|
Loading…
Reference in New Issue
Block a user