[PATCH] D28093: [ADT] Add a generic concatenating iterator and range.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 03:19:03 PST 2016


chandlerc created this revision.
chandlerc added reviewers: dblaikie, mehdi_amini.
chandlerc added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

This allows both defining convenience iterator/range accessors on types
which walk across N different independent ranges within the object, and
more direct and simple usages with range based for loops such as shown
in the unittest. The same facilities are used for both. They end up
quite small and simple as it happens.

I've also switched an iterator on `Module` to use this. I would like to
add another convenience iterator that includes even more sequences as
part of it and seeing this one already present motivated me to actually
abstract it away and introduce a general utility.


https://reviews.llvm.org/D28093

Files:
  include/llvm/ADT/STLExtras.h
  include/llvm/IR/Module.h
  unittests/ADT/STLExtrasTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28093.82438.patch
Type: text/x-patch
Size: 9576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161224/11743567/attachment.bin>


More information about the llvm-commits mailing list