[Mlir-commits] [mlir] 6394ad4 - [mlir] Fix deprecation warnings (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Mon Sep 12 08:53:01 PDT 2022
Author: Kazu Hirata
Date: 2022-09-12T08:52:51-07:00
New Revision: 6394ad4421bcea87ac3112bfd41505d337a4e5b6
URL: https://github.com/llvm/llvm-project/commit/6394ad4421bcea87ac3112bfd41505d337a4e5b6
DIFF: https://github.com/llvm/llvm-project/commit/6394ad4421bcea87ac3112bfd41505d337a4e5b6.diff
LOG: [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]
Added:
Modified:
mlir/lib/Dialect/Vector/IR/VectorOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index 78ccb1fcf26d2..5e1b95ee29070 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<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));
More information about the Mlir-commits
mailing list