[Mlir-commits] [mlir] ac798ea - [mlir] Fix -Wunused-variable in ROCDL/Target.cpp (NFC)
Jie Fu
llvmlistbot at llvm.org
Fri Nov 3 17:15:46 PDT 2023
Author: Jie Fu
Date: 2023-11-04T08:15:37+08:00
New Revision: ac798eaa96c0cce3ddd37894d38b09ef5820443d
URL: https://github.com/llvm/llvm-project/commit/ac798eaa96c0cce3ddd37894d38b09ef5820443d
DIFF: https://github.com/llvm/llvm-project/commit/ac798eaa96c0cce3ddd37894d38b09ef5820443d.diff
LOG: [mlir] Fix -Wunused-variable in ROCDL/Target.cpp (NFC)
/llvm-project/mlir/lib/Target/LLVM/ROCDL/Target.cpp:181:40: error: unused variable 'targetMachine' [-Werror,-Wunused-variable]
std::optional<llvm::TargetMachine *> targetMachine =
^
1 error generated.
Added:
Modified:
mlir/lib/Target/LLVM/ROCDL/Target.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVM/ROCDL/Target.cpp b/mlir/lib/Target/LLVM/ROCDL/Target.cpp
index 709275c7ddef20f..a589e5cbbb61983 100644
--- a/mlir/lib/Target/LLVM/ROCDL/Target.cpp
+++ b/mlir/lib/Target/LLVM/ROCDL/Target.cpp
@@ -178,7 +178,7 @@ LogicalResult SerializeGPUModuleBase::handleBitcodeFile(llvm::Module &module) {
}
void SerializeGPUModuleBase::handleModulePreLink(llvm::Module &module) {
- std::optional<llvm::TargetMachine *> targetMachine =
+ [[maybe_unused]] std::optional<llvm::TargetMachine *> targetMachine =
getOrCreateTargetMachine();
assert(targetMachine && "expect a TargetMachine");
addControlVariables(module, target.hasWave64(), target.hasDaz(),
More information about the Mlir-commits
mailing list