[NFCI] Fix set-but-unused warning in SPIRVUtilsGen.cpp
authorDávid Bolvanský <david.bolvansky@gmail.com>
Thu, 24 Mar 2022 07:53:42 +0000 (08:53 +0100)
committerDávid Bolvanský <david.bolvansky@gmail.com>
Thu, 24 Mar 2022 07:53:42 +0000 (08:53 +0100)
mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

index 6833072..b1fc3c1 100644 (file)
@@ -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);