18#ifndef LLVM_ADT_ITERATOR_RANGE_H
19#define LLVM_ADT_ITERATOR_RANGE_H
27template <
typename From,
typename To,
typename =
void>
30template <
typename From,
typename To>
33 std::void_t<decltype(static_cast<To>(
34 std::declval<std::add_rvalue_reference_t<From>>()))>> : std::true_type {
41template <
typename IteratorT>
43 IteratorT begin_iterator, end_iterator;
46#if __GNUC__ == 7 || (__GNUC__ == 8 && __GNUC_MINOR__ < 4)
49 template <
typename Container>
60 : begin_iterator(
std::
move(begin_iterator)),
61 end_iterator(
std::
move(end_iterator)) {}
63 IteratorT
begin()
const {
return begin_iterator; }
64 IteratorT
end()
const {
return end_iterator; }
65 bool empty()
const {
return begin_iterator == end_iterator; }
68template <
typename Container>
BlockVerifier::State From
Given that RA is a live value
A range adaptor for a pair of iterators.
iterator_range(IteratorT begin_iterator, IteratorT end_iterator)
iterator_range(Container &&c)
decltype(adl_begin(std::declval< RangeT & >())) IterOfRange
This is an optimization pass for GlobalISel generic memory operations.
constexpr auto adl_begin(RangeT &&range) -> decltype(adl_detail::begin_impl(std::forward< RangeT >(range)))
Returns the begin iterator to range using std::begin and function found through Argument-Dependent Lo...
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
constexpr auto adl_end(RangeT &&range) -> decltype(adl_detail::end_impl(std::forward< RangeT >(range)))
Returns the end iterator to range using std::end and functions found through Argument-Dependent Looku...
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.