This patch fixes a couple of warnings by switching to has_value/value:
mlir/lib/Dialect/Vector/IR/VectorOps.cpp:529:28: error: 'hasValue'
is deprecated: Use has_value
instead. [-Werror,-Wdeprecated-declarations]
mlir/lib/Dialect/Vector/IR/VectorOps.cpp:533:48: error: 'getValue'
is deprecated: Use value
instead. [-Werror,-Wdeprecated-declarations]
for (StringRef s : iteratorTypes.getAsValueRange<StringAttr>()) {
auto maybeIteratorType = symbolizeIteratorType(s);
- if (!maybeIteratorType.hasValue())
+ if (!maybeIteratorType.has_value())
return parser.emitError(loc) << "unexpected iterator_type (" << s << ")";
iteratorTypeAttrs.push_back(IteratorTypeAttr::get(
- parser.getContext(), maybeIteratorType.getValue()));
+ parser.getContext(), maybeIteratorType.value()));
}
result.attributes.set("iterator_types",
parser.getBuilder().getArrayAttr(iteratorTypeAttrs));