Skip to content

Commit c7a7a43

Browse files
committed
[mlir] Fix unused variable warning. (NFC)
Not used in all cases. Shown by python test ops.
1 parent c3a302d commit c7a7a43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/tools/mlir-tblgen/OpFormatGen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,8 @@ void OperationFormat::genElementParser(FormatElement *element, MethodBody &body,
14151415
} else if (auto *customDir = dyn_cast<CustomDirective>(element)) {
14161416
genCustomDirectiveParser(customDir, body, useProperties, opCppClassName);
14171417
} else if (isa<OperandsDirective>(element)) {
1418-
body << " ::llvm::SMLoc allOperandLoc = parser.getCurrentLocation();\n"
1418+
body << " [[maybe_unused]] ::llvm::SMLoc allOperandLoc ="
1419+
<< " parser.getCurrentLocation();\n"
14191420
<< " if (parser.parseOperandList(allOperands))\n"
14201421
<< " return ::mlir::failure();\n";
14211422

0 commit comments

Comments
 (0)