[Mlir-commits] [mlir] [mlir][OpFormatGen][NFC] Initialize C-style arrays upon creation (PR #85631)
Andrei Golubev
llvmlistbot at llvm.org
Tue Mar 19 01:26:15 PDT 2024
================
@@ -842,7 +842,7 @@ static void genElementParserStorage(FormatElement *element, const Operator &op,
}
} else {
body << " ::mlir::OpAsmParser::UnresolvedOperand " << name
- << "RawOperands[1];\n"
+ << "RawOperands[1] = {};\n"
<< " ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> "
<< name << "Operands(" << name << "RawOperands);";
----------------
andrey-golubev wrote:
Nope :(
```
build/tools/mlir/include/mlir/Dialect/Bufferization/TransformOps/BufferizationTransformOps.cpp.inc:502:27: error: use of undeclared identifier 'targetRawOperands'; did you mean 'targetRawOperand'?
if (parser.parseOperand(targetRawOperands[0]))
^~~~~~~~~~~~~~~~~
targetRawOperand
```
Same for types well.
Guessing this is supposed to be an array and named in a special way for the parsing logic to be length-agnostic (not there's another branch in the codegen right above this under `if (operand->getVar()->isVariableLength())`).
https://github.com/llvm/llvm-project/pull/85631
More information about the Mlir-commits
mailing list