[Mlir-commits] [mlir] e5a5e00 - [mlir] fix compiler warnings
Alex Zinenko
llvmlistbot at llvm.org
Thu Apr 14 06:26:56 PDT 2022
Author: Alex Zinenko
Date: 2022-04-14T15:26:50+02:00
New Revision: e5a5e008256c20f4c2d870d687eda4caef25f9ea
URL: https://github.com/llvm/llvm-project/commit/e5a5e008256c20f4c2d870d687eda4caef25f9ea
DIFF: https://github.com/llvm/llvm-project/commit/e5a5e008256c20f4c2d870d687eda4caef25f9ea.diff
LOG: [mlir] fix compiler warnings
-Wsign-compare and -Wunsued-value in the recently introduced code.
Added:
Modified:
mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h b/mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h
index 3b5f52beb670e..628a46535f338 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformDialect.h
@@ -69,7 +69,7 @@ class TransformDialectExtension
transformDialect->addOperations<OpTys...>();
#ifndef NDEBUG
- std::initializer_list<int>{
+ (void)std::initializer_list<int>{
(detail::checkImplementsTransformInterface<OpTys>(
transformDialect->getContext()),
0)...};
diff --git a/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp b/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
index 6cf00cf002b3f..b0226b598dbe2 100644
--- a/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
+++ b/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
@@ -72,7 +72,7 @@ LogicalResult mlir::test::TestConsumeOperandIfMatchesParamOrFail::apply(
ArrayRef<Operation *> payload = state.getPayloadOps(getOperand());
assert(payload.size() == 1 && "expected a single target op");
auto value = reinterpret_cast<intptr_t>(payload[0]);
- if (value != parameter()) {
+ if (static_cast<uint64_t>(value) != parameter()) {
return emitOpError() << "expected the operand to be associated with "
<< parameter() << " got " << value;
}
More information about the Mlir-commits
mailing list