[Mlir-commits] [mlir] 46ec271 - [mlir] Fix -Wunused-variable in OpenMPToLLVMIRTranslation.cpp (NFC)
Jie Fu
llvmlistbot at llvm.org
Thu Dec 12 06:12:33 PST 2024
Author: Jie Fu
Date: 2024-12-12T22:11:41+08:00
New Revision: 46ec271e039dfea0b8bb543290d27ca18b2e807b
URL: https://github.com/llvm/llvm-project/commit/46ec271e039dfea0b8bb543290d27ca18b2e807b
DIFF: https://github.com/llvm/llvm-project/commit/46ec271e039dfea0b8bb543290d27ca18b2e807b.diff
LOG: [mlir] Fix -Wunused-variable in OpenMPToLLVMIRTranslation.cpp (NFC)
/llvm-project/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:3921:12:
error: unused variable 'varType' [-Werror,-Wunused-variable]
Type varType = mapInfoOp.getVarType();
^
1 error generated.
Added:
Modified:
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 8d2a8b291f5f99..ff8606ed6b3f9e 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -3918,7 +3918,7 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
// So, we don't store it in any datastructure. Instead, we just
// do some sanity checks on it right now.
auto mapInfoOp = mappedValue.getDefiningOp<omp::MapInfoOp>();
- Type varType = mapInfoOp.getVarType();
+ [[maybe_unused]] Type varType = mapInfoOp.getVarType();
// Check #1: Check that the type of the private variable matches
// the type of the variable being mapped.
More information about the Mlir-commits
mailing list