[PATCH] D17870: [ADT] Add an 'llvm::seq' function which produces an iterator range over a sequence of values. It increments through the values in the half-open range: [Begin, End), producing those values when indirecting the iterator. It should support integers...
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 22:58:52 PDT 2016
sanjoy added a subscriber: sanjoy.
sanjoy added a comment.
Hi Chandler,
This is great! With this and `map_iterator`, writing iterators for semi-complex data structures will become a lot more scalable, since I can write them as maps of `Foo::getElementAtIndex(i)` over `seq(0, elementCount)`. E.g. this is how easy it is to implement a range for operand bundles with this change: (rough code) https://ghostbin.com/paste/srpq7
http://reviews.llvm.org/D17870
More information about the llvm-commits
mailing list