From 6394ad4421bcea87ac3112bfd41505d337a4e5b6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 12 Sep 2022 08:52:51 -0700 Subject: [PATCH] [mlir] Fix deprecation warnings (NFC) 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] --- mlir/lib/Dialect/Vector/IR/VectorOps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp index 78ccb1f..5e1b95e 100644 --- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp +++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp @@ -526,11 +526,11 @@ ParseResult ContractionOp::parse(OpAsmParser &parser, OperationState &result) { for (StringRef s : iteratorTypes.getAsValueRange()) { 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)); -- 2.7.4