@@ -29,12 +29,11 @@ namespace mlir {
29
29
// / a SmallVector/std::vector. This class should be used in places that are not
30
30
// / suitable for a more derived type (e.g. ArrayRef) or a template range
31
31
// / parameter.
32
- class TypeRange
33
- : public llvm::detail::indexed_accessor_range_base<
34
- TypeRange,
35
- llvm::PointerUnion<const Value *, const Type *, OpOperand *,
36
- detail::OpResultImpl *, Type>,
37
- Type, Type, Type> {
32
+ class TypeRange : public llvm ::detail::indexed_accessor_range_base<
33
+ TypeRange,
34
+ llvm::PointerUnion<const Value *, const Type *,
35
+ OpOperand *, detail::OpResultImpl *>,
36
+ Type, Type, Type> {
38
37
public:
39
38
using RangeBaseT::RangeBaseT;
40
39
TypeRange (ArrayRef<Type> types = std::nullopt);
@@ -45,11 +44,8 @@ class TypeRange
45
44
TypeRange (ValueTypeRange<ValueRangeT> values)
46
45
: TypeRange(ValueRange(ValueRangeT(values.begin().getCurrent(),
47
46
values.end().getCurrent()))) {}
48
-
49
- TypeRange (Type type) : TypeRange(type, /* count=*/ 1 ) {}
50
- template <typename Arg, typename = std::enable_if_t <
51
- std::is_constructible_v<ArrayRef<Type>, Arg> &&
52
- !std::is_constructible_v<Type, Arg>>>
47
+ template <typename Arg, typename = std::enable_if_t <std::is_constructible<
48
+ ArrayRef<Type>, Arg>::value>>
53
49
TypeRange (Arg &&arg) : TypeRange(ArrayRef<Type>(std::forward<Arg>(arg))) {}
54
50
TypeRange (std::initializer_list<Type> types)
55
51
: TypeRange(ArrayRef<Type>(types)) {}
@@ -60,9 +56,8 @@ class TypeRange
60
56
// / * A pointer to the first element of an array of types.
61
57
// / * A pointer to the first element of an array of operands.
62
58
// / * A pointer to the first element of an array of results.
63
- // / * A single 'Type' instance.
64
59
using OwnerT = llvm::PointerUnion<const Value *, const Type *, OpOperand *,
65
- detail::OpResultImpl *, Type >;
60
+ detail::OpResultImpl *>;
66
61
67
62
// / See `llvm::detail::indexed_accessor_range_base` for details.
68
63
static OwnerT offset_base (OwnerT object, ptrdiff_t index);
0 commit comments