diff options
author | Fangrui Song <i@maskray.me> | 2022-08-19 23:29:31 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-08-19 23:29:31 -0700 |
commit | 35e56771ab36975b73d641ff9cb6eb6250adb526 (patch) | |
tree | 68290fec6ae24477f32bfeb1c6400514da17120d | |
parent | 2f50883c132879395c2cb45c458a4ec132309b32 (diff) | |
download | llvm-35e56771ab36975b73d641ff9cb6eb6250adb526.zip llvm-35e56771ab36975b73d641ff9cb6eb6250adb526.tar.gz llvm-35e56771ab36975b73d641ff9cb6eb6250adb526.tar.bz2 |
[mlir][docs] Migrate away from deprecated llvm::Optional methods
-rw-r--r-- | mlir/docs/DefiningDialects.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/docs/DefiningDialects.md b/mlir/docs/DefiningDialects.md index 6445b52..c043eab 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(); } |