Skip to content

Commit 7858071

Browse files
authored
[mlir][llvm] Fix attribute printer warning (NFC)(#74351)
This commit fixes a compilation warning caused by the printExpressionArg function that previously returned LogicalResult instead of void. The warning has been introduced by #73367.
1 parent f81eb7d commit 7858071

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ static LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
3131

3232
/// Prints DWARF expression arguments with respect to the specific DWARF
3333
/// operation. Some operands are printed in their textual form.
34-
static LogicalResult printExpressionArg(AsmPrinter &printer, uint64_t opcode,
35-
ArrayRef<uint64_t> args);
34+
static void printExpressionArg(AsmPrinter &printer, uint64_t opcode,
35+
ArrayRef<uint64_t> args);
3636

3737
#include "mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc"
3838
#define GET_ATTRDEF_CLASSES
@@ -166,8 +166,8 @@ LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
166166
return parser.parseCommaSeparatedList(operandParser);
167167
}
168168

169-
LogicalResult printExpressionArg(AsmPrinter &printer, uint64_t opcode,
170-
ArrayRef<uint64_t> args) {
169+
void printExpressionArg(AsmPrinter &printer, uint64_t opcode,
170+
ArrayRef<uint64_t> args) {
171171
size_t i = 0;
172172
llvm::interleaveComma(args, printer, [&](uint64_t operand) {
173173
if (i > 0 && opcode == llvm::dwarf::DW_OP_LLVM_convert) {
@@ -182,5 +182,4 @@ LogicalResult printExpressionArg(AsmPrinter &printer, uint64_t opcode,
182182
printer << operand;
183183
i++;
184184
});
185-
return success();
186185
}

0 commit comments

Comments
 (0)