diff --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp index ed2d81ee65eb4..8e36638d6e545 100644 --- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp +++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp @@ -2114,8 +2114,8 @@ LogicalResult ObjectAttr::verify(function_ref emitError, } namespace { -LogicalResult parseObject(AsmParser &odsParser, CompilationTarget &format, - StringAttr &object) { +ParseResult parseObject(AsmParser &odsParser, CompilationTarget &format, + StringAttr &object) { std::optional formatResult; StringRef enumKeyword; auto loc = odsParser.getCurrentLocation(); diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp index ee4e344674a67..c7ddc1b36f4d4 100644 --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp @@ -27,8 +27,8 @@ using namespace mlir::LLVM; /// Parses DWARF expression arguments with respect to the DWARF operation /// opcode. Some DWARF expression operations have a specific number of operands /// and may appear in a textual form. -static LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode, - SmallVector &args); +static ParseResult parseExpressionArg(AsmParser &parser, uint64_t opcode, + SmallVector &args); /// Prints DWARF expression arguments with respect to the specific DWARF /// operation. Some operands are printed in their textual form. @@ -144,8 +144,8 @@ DIExpressionAttr DIExpressionAttr::get(MLIRContext *context) { return get(context, ArrayRef({})); } -LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode, - SmallVector &args) { +ParseResult parseExpressionArg(AsmParser &parser, uint64_t opcode, + SmallVector &args) { auto operandParser = [&]() -> LogicalResult { uint64_t operand = 0; if (!args.empty() && opcode == llvm::dwarf::DW_OP_LLVM_convert) { diff --git a/mlir/test/lib/Dialect/Test/TestTypes.cpp b/mlir/test/lib/Dialect/Test/TestTypes.cpp index 1593b6d7d7534..6e31bb71d04d8 100644 --- a/mlir/test/lib/Dialect/Test/TestTypes.cpp +++ b/mlir/test/lib/Dialect/Test/TestTypes.cpp @@ -90,14 +90,14 @@ static llvm::hash_code test::hash_value(const FieldInfo &fi) { // NOLINT // TestCustomType //===----------------------------------------------------------------------===// -static LogicalResult parseCustomTypeA(AsmParser &parser, int &aResult) { +static ParseResult parseCustomTypeA(AsmParser &parser, int &aResult) { return parser.parseInteger(aResult); } static void printCustomTypeA(AsmPrinter &printer, int a) { printer << a; } -static LogicalResult parseCustomTypeB(AsmParser &parser, int a, - std::optional &bResult) { +static ParseResult parseCustomTypeB(AsmParser &parser, int a, + std::optional &bResult) { if (a < 0) return success(); for (int i : llvm::seq(0, a)) @@ -116,7 +116,7 @@ static void printCustomTypeB(AsmPrinter &printer, int a, std::optional b) { printer << *b; } -static LogicalResult parseFooString(AsmParser &parser, std::string &foo) { +static ParseResult parseFooString(AsmParser &parser, std::string &foo) { std::string result; if (parser.parseString(&result)) return failure(); @@ -128,7 +128,7 @@ static void printFooString(AsmPrinter &printer, StringRef foo) { printer << '"' << foo << '"'; } -static LogicalResult parseBarString(AsmParser &parser, StringRef foo) { +static ParseResult parseBarString(AsmParser &parser, StringRef foo) { return parser.parseKeyword(foo); }