diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2017-02-07 21:03:50 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2017-02-07 21:03:50 +0000 |
commit | fcd69daaa14099e350e937ec4575445b78a72c6c (patch) | |
tree | 1d1aa3bfc7409235a812b291a6619cc5ad294231 /llvm/lib/Transforms/Utils/Utils.cpp | |
parent | 819e3e02a9d4e2b0e986c5d2cfe13f138cff17cc (diff) | |
download | bcm5719-llvm-fcd69daaa14099e350e937ec4575445b78a72c6c.tar.gz bcm5719-llvm-fcd69daaa14099e350e937ec4575445b78a72c6c.zip |
ADT: Add explicit conversions for reverse ilist iterators
Add explicit conversions between forward and reverse ilist iterators.
These follow the conversion conventions of std::reverse_iterator, which
are off-by-one: the newly-constructed "reverse" iterator dereferences to
the previous node of the one sent in. This has the benefit of
converting reverse ranges in place:
- If [I, E) is a valid range,
- then [reverse(E), reverse(I)) gives the same range in reverse order.
ilist_iterator::getReverse() is unchanged: it returns a reverse iterator
to the *same* node.
llvm-svn: 294349
Diffstat (limited to 'llvm/lib/Transforms/Utils/Utils.cpp')
0 files changed, 0 insertions, 0 deletions