These map to the similar accessors on ArrayRef and other random access containers.
This fixes a compilation error on MLIR ODS for variadic operands/results, which relied on the availability of front in certain situations.
assert(index < size() && "invalid index for value range");
return DerivedT::dereference_iterator(base, index);
}
+ ReferenceT front() const {
+ assert(!empty() && "expected non-empty range");
+ return (*this)[0];
+ }
+ ReferenceT back() const {
+ assert(!empty() && "expected non-empty range");
+ return (*this)[size() - 1];
+ }
/// Compare this range with another.
template <typename OtherT> bool operator==(const OtherT &other) const {
Variadic<AnyTensor>:$input3
);
}
+def VariadicWithSameOperandsResult :
+ TEST_Op<"variadic_with_same_operand_results",
+ [SameOperandsAndResultType]> {
+ let arguments = (ins Variadic<AnySignlessInteger>:$operands);
+ let results = (outs AnySignlessInteger:$result);
+}
//===----------------------------------------------------------------------===//
// Test Results