Skip to content

Conversation

@gysit
Copy link
Contributor

@gysit gysit commented Dec 4, 2023

This commit fixes a compilation warning caused by the printExpressionArg that returns LogicalResult instead of void.

The warning has been introduce by commit 6da578c.

This commit fixes a compilation warning caused by the printExpressionArg that returns LogicalResult instead of void. The warning has been introduce by commit 6da578c.
@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2023

@llvm/pr-subscribers-mlir-llvm

@llvm/pr-subscribers-mlir

Author: Tobias Gysi (gysit)

Changes

This commit fixes a compilation warning caused by the printExpressionArg that returns LogicalResult instead of void.

The warning has been introduce by commit 6da578c.


Full diff: https://github.com/llvm/llvm-project/pull/74351.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp (+4-5)
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(); } 
Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes my issue. Thanks for the the quick fix!

@gysit gysit merged commit 7858071 into llvm:main Dec 4, 2023
@gysit gysit deleted the fix-expression-arg-printer branch December 4, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants