[Mlir-commits] [mlir] [MLIR][OpenMP] Fix unused variable warning for #137201 (PR #178659)

Walter Lee llvmlistbot at llvm.org
Thu Jan 29 05:57:47 PST 2026


https://github.com/googlewalt created https://github.com/llvm/llvm-project/pull/178659

Fixes 4cc80831ea5d39c186fc29692556b762ffb6478b.

>From 7648bcd3014049e83d320f49ca7c2fd29e1db382 Mon Sep 17 00:00:00 2001
From: Walter Lee <waltl at google.com>
Date: Thu, 29 Jan 2026 13:56:30 +0000
Subject: [PATCH] [MLIR][OpenMP] Fix unused variable warning for #137201

Fixes 4cc80831ea5d39c186fc29692556b762ffb6478b.
---
 .../LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 72bf6e47afd46..2c1b8c2632df2 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -5395,8 +5395,8 @@ convertOmpTargetData(Operation *op, llvm::IRBuilderBase &builder,
   llvm::OpenMPIRBuilder::TargetDataInfo info(
       /*RequiresDevicePointerInfo=*/true,
       /*SeparateBeginEndCalls=*/true);
-  bool isTargetDevice = ompBuilder->Config.isTargetDevice();
-  assert(!isTargetDevice && "target data/enter/exit/update are host ops");
+  assert(!ompBuilder->Config.isTargetDevice() &&
+         "target data/enter/exit/update are host ops");
   bool isOffloadEntry = !ompBuilder->Config.TargetTriples.empty();
 
   auto getDeviceID = [&](mlir::Value dev) -> llvm::Value * {



More information about the Mlir-commits mailing list