Add llvm::enumerate() range adapter.
authorZachary Turner <zturner@google.com>
Wed, 5 Oct 2016 16:54:09 +0000 (16:54 +0000)
committerZachary Turner <zturner@google.com>
Wed, 5 Oct 2016 16:54:09 +0000 (16:54 +0000)
commitaa0a562bd792624f1bfba69de599f3cc50154d90
tree8569cf0a0ebacf13d553c38d96600121755dfe53
parent24db10d8e1419f44e1d9f1d3fa2ba5fb181250c6
Add llvm::enumerate() range adapter.

This allows you to enumerate over a range using a range-based
for while the return type contains the index of the enumeration.

Differential revision: https://reviews.llvm.org/D25124

llvm-svn: 283337
llvm/include/llvm/ADT/STLExtras.h
llvm/unittests/ADT/STLExtrasTest.cpp