[Mlir-commits] [mlir] 7858071 - [mlir][llvm] Fix attribute printer warning (NFC)(#74351)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Dec 4 10:11:01 PST 2023
Author: Tobias Gysi
Date: 2023-12-04T19:10:56+01:00
New Revision: 78580715240e2744b2ba7995b532369a27bc76ac
URL: https://github.com/llvm/llvm-project/commit/78580715240e2744b2ba7995b532369a27bc76ac
DIFF: https://github.com/llvm/llvm-project/commit/78580715240e2744b2ba7995b532369a27bc76ac.diff
LOG: [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.
Added:
Modified:
mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
index 053524679ece7..e2342670508ce 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
@@ -31,8 +31,8 @@ static LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
/// Prints DWARF expression arguments with respect to the specific DWARF
/// operation. Some operands are printed in their textual form.
-static LogicalResult printExpressionArg(AsmPrinter &printer, uint64_t opcode,
- ArrayRef<uint64_t> args);
+static void printExpressionArg(AsmPrinter &printer, uint64_t opcode,
+ ArrayRef<uint64_t> args);
#include "mlir/Dialect/LLVMIR/LLVMOpsEnums.cpp.inc"
#define GET_ATTRDEF_CLASSES
@@ -166,8 +166,8 @@ LogicalResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
return parser.parseCommaSeparatedList(operandParser);
}
-LogicalResult printExpressionArg(AsmPrinter &printer, uint64_t opcode,
- ArrayRef<uint64_t> args) {
+void printExpressionArg(AsmPrinter &printer, uint64_t opcode,
+ ArrayRef<uint64_t> args) {
size_t i = 0;
llvm::interleaveComma(args, printer, [&](uint64_t operand) {
if (i > 0 && opcode == llvm::dwarf::DW_OP_LLVM_convert) {
@@ -182,5 +182,4 @@ LogicalResult printExpressionArg(AsmPrinter &printer, uint64_t opcode,
printer << operand;
i++;
});
- return success();
}
More information about the Mlir-commits
mailing list