[Mlir-commits] [mlir] 6b451c8 - [mlir] Use std::optional instead of llvm::Optional (NFC)
Kazu Hirata
llvmlistbot at llvm.org
Sat May 6 08:56:39 PDT 2023
Author: Kazu Hirata
Date: 2023-05-06T08:56:25-07:00
New Revision: 6b451c8012696fb81b0eb6441b14d96dd04e59ca
URL: https://github.com/llvm/llvm-project/commit/6b451c8012696fb81b0eb6441b14d96dd04e59ca
DIFF: https://github.com/llvm/llvm-project/commit/6b451c8012696fb81b0eb6441b14d96dd04e59ca.diff
LOG: [mlir] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Added:
Modified:
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index 60b41b9720750..84663af346f5f 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -187,7 +187,8 @@ parseCommonStructuredOpParts(OpAsmParser &parser, OperationState &result,
}
}
if (!result.propertiesAttr) {
- Optional<RegisteredOperationName> info = result.name.getRegisteredInfo();
+ std::optional<RegisteredOperationName> info =
+ result.name.getRegisteredInfo();
if (info) {
if (failed(info->verifyInherentAttrs(result.attributes, [&]() {
return parser.emitError(attrsLoc)
More information about the Mlir-commits
mailing list