From 35e56771ab36975b73d641ff9cb6eb6250adb526 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 19 Aug 2022 23:29:31 -0700 Subject: [PATCH] [mlir][docs] Migrate away from deprecated llvm::Optional methods --- mlir/docs/DefiningDialects.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mlir/docs/DefiningDialects.md b/mlir/docs/DefiningDialects.md index 6445b52cb9c6..c043eabeacc8 100644 --- a/mlir/docs/DefiningDialects.md +++ b/mlir/docs/DefiningDialects.md @@ -528,7 +528,7 @@ Type MyDialect::parseType(DialectAsmParser &parser) const { // Try to parse a dynamic type with 'typeTag' name. Type dynType; auto parseResult = parseOptionalDynamicType(typeTag, parser, dynType); - if (parseResult.hasValue()) { + if (parseResult.has_value()) { if (succeeded(parseResult.getValue())) return dynType; return Type(); @@ -628,8 +628,8 @@ Attribute MyDialect::parseAttribute(DialectAsmParser &parser, // Try to parse a dynamic attribute with 'attrTag' name. Attribute dynAttr; auto parseResult = parseOptionalDynamicAttr(attrTag, parser, dynAttr); - if (parseResult.hasValue()) { - if (succeeded(parseResult.getValue())) + if (parseResult.has_value()) { + if (succeeded(*parseResult)) return dynAttr; return Attribute(); }