llvm::make_range

Convenience function for iterating over sub-ranges.

Synopsis

Declared in <llvm/ADT/iterator_range.h>

template<class T>
iterator_range<T>
make_range(
    T x,
    T y);

Description

This provides a bit of syntactic sugar to make using sub-ranges in for loops a bit easier. Analogous to std::make_pair().

Return Value

An iterator_range covering []x, y).

Parameters

NameDescription
xIterator to the first element.
yIterator past the last element.