[Mlir-commits] [mlir] 431c142 - [NFCI] Fix set-but-unused warning in SPIRVUtilsGen.cpp
Dávid Bolvanský
llvmlistbot at llvm.org
Thu Mar 24 00:53:53 PDT 2022
Author: Dávid Bolvanský
Date: 2022-03-24T08:53:42+01:00
New Revision: 431c14248b59f8d02cee303b82087c4d8b6da66b
URL: https://github.com/llvm/llvm-project/commit/431c14248b59f8d02cee303b82087c4d8b6da66b
DIFF: https://github.com/llvm/llvm-project/commit/431c14248b59f8d02cee303b82087c4d8b6da66b.diff
LOG: [NFCI] Fix set-but-unused warning in SPIRVUtilsGen.cpp
Added:
Modified:
mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp b/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
index 683307229e13a..b1fc3c177bcbf 100644
--- a/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
+++ b/mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
@@ -887,7 +887,6 @@ static void emitOperandDeserialization(const Operator &op, ArrayRef<SMLoc> loc,
StringRef wordIndex, StringRef operands,
StringRef attributes, raw_ostream &os) {
// Process operands/attributes
- unsigned operandNum = 0;
for (unsigned i = 0, e = op.getNumArgs(); i < e; ++i) {
auto argument = op.getArg(i);
if (auto *valueArg = argument.dyn_cast<NamedTypeConstraint *>()) {
@@ -916,7 +915,6 @@ static void emitOperandDeserialization(const Operator &op, ArrayRef<SMLoc> loc,
if (!valueArg->isVariableLength()) {
os << tabs << formatv(" {0}++;\n", wordIndex);
}
- operandNum++;
os << tabs << "}\n";
} else {
os << tabs << formatv("if ({0} < {1}.size()) {{\n", wordIndex, words);
More information about the Mlir-commits
mailing list