[mlir][assemblyFormat] Fix bug when using AttrSizedOperandSegments trait with only...
authorMartin Erhart <maerhart@outlook.com>
Tue, 28 Apr 2020 16:25:04 +0000 (18:25 +0200)
committerJean-Michel Gorius <jean-michel.gorius@ens-rennes.fr>
Tue, 28 Apr 2020 16:27:05 +0000 (18:27 +0200)
commitedb77864ef7865437f425e98f2089e426a1ea8dc
tree88ad83b8b6fd8f7b0c06b2709ecd2df76271ab74
parentc4c3883b00d3a6aa657a5e3e515c90c9ea1f81c6
[mlir][assemblyFormat] Fix bug when using AttrSizedOperandSegments trait with only non-buildable operand types

Summary:
When creating an operation with
* `AttrSizedOperandSegments` trait
* Variadic operands of only non-buildable types
* assemblyFormat to automatically generate the parser
the `builder` local variable is used, but never declared.
This adds a fix as well as a test for this case as existing ones use buildable types only.

Reviewers: rriddle, Kayjukh, grosser

Reviewed By: Kayjukh

Subscribers: mehdi_amini, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits

Tags: #mlir, #llvm

Differential Revision: https://reviews.llvm.org/D79004
mlir/test/lib/Dialect/Test/TestOps.td
mlir/tools/mlir-tblgen/OpFormatGen.cpp