diff options
author | Kazu Hirata <kazu@google.com> | 2022-08-06 11:21:39 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-08-06 11:21:39 -0700 |
commit | c8e6ebd74e548bd79662166906de53554773265e (patch) | |
tree | 31c2bb46570d60295f721474426212085cea479d /mlir/lib | |
parent | 9750648cb44e3b201bce5878ce785228d1c005c7 (diff) |
Use value instead of getValue (NFC)
Diffstat (limited to 'mlir/lib')
-rw-r--r-- | mlir/lib/Dialect/DLTI/DLTI.cpp | 4 | ||||
-rw-r--r-- | mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp | 4 | ||||
-rw-r--r-- | mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp | 2 | ||||
-rw-r--r-- | mlir/lib/Dialect/SCF/IR/SCF.cpp | 2 | ||||
-rw-r--r-- | mlir/lib/IR/FunctionImplementation.cpp | 2 | ||||
-rw-r--r-- | mlir/lib/Interfaces/ViewLikeInterface.cpp | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/mlir/lib/Dialect/DLTI/DLTI.cpp b/mlir/lib/Dialect/DLTI/DLTI.cpp index a5f5d4b13e1c..eaf6f1e619a0 100644 --- a/mlir/lib/Dialect/DLTI/DLTI.cpp +++ b/mlir/lib/Dialect/DLTI/DLTI.cpp @@ -73,11 +73,11 @@ DataLayoutEntryAttr DataLayoutEntryAttr::parse(AsmParser &parser) { std::string identifier; SMLoc idLoc = parser.getCurrentLocation(); OptionalParseResult parsedType = parser.parseOptionalType(type); - if (parsedType.has_value() && failed(parsedType.getValue())) + if (parsedType.has_value() && failed(parsedType.value())) return {}; if (!parsedType.has_value()) { OptionalParseResult parsedString = parser.parseOptionalString(&identifier); - if (!parsedString.has_value() || failed(parsedString.getValue())) { + if (!parsedString.has_value() || failed(parsedString.value())) { parser.emitError(idLoc) << "expected a type or a quoted string"; return {}; } diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp index 7f3ba764c68a..825d6eac56c5 100644 --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp @@ -344,7 +344,7 @@ static ParseResult parseSwitchOpCases( if (values.empty() && !integerParseResult.has_value()) return success(); - if (!integerParseResult.has_value() || integerParseResult.getValue()) + if (!integerParseResult.has_value() || integerParseResult.value()) return failure(); values.push_back(APInt(bitWidth, value)); @@ -542,7 +542,7 @@ parseGEPIndices(OpAsmParser &parser, OptionalParseResult parsedInteger = parser.parseOptionalInteger(constantIndex); if (parsedInteger.has_value()) { - if (failed(parsedInteger.getValue())) + if (failed(parsedInteger.value())) return failure(); constantIndices.push_back(constantIndex); return success(); diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp index e9121804a7d3..1702cd636d23 100644 --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMTypeSyntax.cpp @@ -442,7 +442,7 @@ static Type dispatchParse(AsmParser &parser, bool allowAny = true) { Type type; OptionalParseResult result = parser.parseOptionalType(type); if (result.has_value()) { - if (failed(result.getValue())) + if (failed(result.value())) return nullptr; if (!allowAny) { parser.emitError(keyLoc) << "unexpected type, expected keyword"; diff --git a/mlir/lib/Dialect/SCF/IR/SCF.cpp b/mlir/lib/Dialect/SCF/IR/SCF.cpp index 1f59b2be39bf..62804980cd0d 100644 --- a/mlir/lib/Dialect/SCF/IR/SCF.cpp +++ b/mlir/lib/Dialect/SCF/IR/SCF.cpp @@ -2613,7 +2613,7 @@ ParseResult scf::WhileOp::parse(OpAsmParser &parser, OperationState &result) { OptionalParseResult listResult = parser.parseOptionalAssignmentList(regionArgs, operands); - if (listResult.has_value() && failed(listResult.getValue())) + if (listResult.has_value() && failed(listResult.value())) return failure(); FunctionType functionType; diff --git a/mlir/lib/IR/FunctionImplementation.cpp b/mlir/lib/IR/FunctionImplementation.cpp index 7a04a7d5cc78..9481e4ae8175 100644 --- a/mlir/lib/IR/FunctionImplementation.cpp +++ b/mlir/lib/IR/FunctionImplementation.cpp @@ -42,7 +42,7 @@ parseFunctionArgumentList(OpAsmParser &parser, bool allowVariadic, auto argPresent = parser.parseOptionalArgument( argument, /*allowType=*/true, /*allowAttrs=*/true); if (argPresent.has_value()) { - if (failed(argPresent.getValue())) + if (failed(argPresent.value())) return failure(); // Present but malformed. // Reject this if the preceding argument was missing a name. diff --git a/mlir/lib/Interfaces/ViewLikeInterface.cpp b/mlir/lib/Interfaces/ViewLikeInterface.cpp index eb542a921e12..a593ec6a2a24 100644 --- a/mlir/lib/Interfaces/ViewLikeInterface.cpp +++ b/mlir/lib/Interfaces/ViewLikeInterface.cpp @@ -121,7 +121,7 @@ static ParseResult parseOperandsOrIntegersImpl( while (true) { OpAsmParser::UnresolvedOperand operand; auto res = parser.parseOptionalOperand(operand); - if (res.has_value() && succeeded(res.getValue())) { + if (res.has_value() && succeeded(res.value())) { values.push_back(operand); attrVals.push_back(dynVal); } else { |