[mlir] Fix warnings

This patch fixes:

  mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:3047:16: error: unused
  variable 'ctx' [-Werror,-Wunused-variable]

  mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp:3171:16: error: unused
  variable 'ctx' [-Werror,-Wunused-variable]
This commit is contained in:
Kazu Hirata
2025-07-10 07:58:52 -07:00
parent 9b0ae6ccd6
commit 86320e0a8f

View File

@@ -3044,8 +3044,7 @@ mlir::omp ::decodeCli(Value cli) {
if (!cli)
return {{}, nullptr, nullptr};
MLIRContext *ctx = cli.getContext();
assert(cli.getType() == CanonicalLoopInfoType::get(ctx) &&
assert(cli.getType() == CanonicalLoopInfoType::get(cli.getContext()) &&
"Unexpected type of cli");
NewCliOp create = cast<NewCliOp>(cli.getDefiningOp());
@@ -3168,8 +3167,7 @@ void NewCliOp::getAsmResultNames(OpAsmSetValueNameFn setNameFn) {
LogicalResult NewCliOp::verify() {
Value cli = getResult();
MLIRContext *ctx = cli.getContext();
assert(cli.getType() == CanonicalLoopInfoType::get(ctx) &&
assert(cli.getType() == CanonicalLoopInfoType::get(cli.getContext()) &&
"Unexpected type of cli");
// Check that the CLI is used in at most generator and one consumer