Skip to content

Commit 61579b9

Browse files
committed
fix: custom parse functions using wrong return type
1 parent 2806705 commit 61579b9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

mlir/lib/Dialect/GPU/IR/GPUDialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ LogicalResult ObjectAttr::verify(function_ref<InFlightDiagnostic()> emitError,
21142114
}
21152115

21162116
namespace {
2117-
LogicalResult parseObject(AsmParser &odsParser, CompilationTarget &format,
2117+
ParseResult parseObject(AsmParser &odsParser, CompilationTarget &format,
21182118
StringAttr &object) {
21192119
std::optional<CompilationTarget> formatResult;
21202120
StringRef enumKeyword;

mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using namespace mlir::LLVM;
2727
/// Parses DWARF expression arguments with respect to the DWARF operation
2828
/// opcode. Some DWARF expression operations have a specific number of operands
2929
/// and may appear in a textual form.
30-
static LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
30+
static ParseResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
3131
SmallVector<uint64_t> &args);
3232

3333
/// Prints DWARF expression arguments with respect to the specific DWARF
@@ -144,7 +144,7 @@ DIExpressionAttr DIExpressionAttr::get(MLIRContext *context) {
144144
return get(context, ArrayRef<DIExpressionElemAttr>({}));
145145
}
146146

147-
LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
147+
ParseResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
148148
SmallVector<uint64_t> &args) {
149149
auto operandParser = [&]() -> LogicalResult {
150150
uint64_t operand = 0;

mlir/test/lib/Dialect/Test/TestTypes.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ static llvm::hash_code test::hash_value(const FieldInfo &fi) { // NOLINT
9090
// TestCustomType
9191
//===----------------------------------------------------------------------===//
9292

93-
static LogicalResult parseCustomTypeA(AsmParser &parser, int &aResult) {
93+
static ParseResult parseCustomTypeA(AsmParser &parser, int &aResult) {
9494
return parser.parseInteger(aResult);
9595
}
9696

9797
static void printCustomTypeA(AsmPrinter &printer, int a) { printer << a; }
9898

99-
static LogicalResult parseCustomTypeB(AsmParser &parser, int a,
99+
static ParseResult parseCustomTypeB(AsmParser &parser, int a,
100100
std::optional<int> &bResult) {
101101
if (a < 0)
102102
return success();
@@ -116,7 +116,7 @@ static void printCustomTypeB(AsmPrinter &printer, int a, std::optional<int> b) {
116116
printer << *b;
117117
}
118118

119-
static LogicalResult parseFooString(AsmParser &parser, std::string &foo) {
119+
static ParseResult parseFooString(AsmParser &parser, std::string &foo) {
120120
std::string result;
121121
if (parser.parseString(&result))
122122
return failure();
@@ -128,7 +128,7 @@ static void printFooString(AsmPrinter &printer, StringRef foo) {
128128
printer << '"' << foo << '"';
129129
}
130130

131-
static LogicalResult parseBarString(AsmParser &parser, StringRef foo) {
131+
static ParseResult parseBarString(AsmParser &parser, StringRef foo) {
132132
return parser.parseKeyword(foo);
133133
}
134134

0 commit comments

Comments
 (0)