[mlir][ods] Custom builder with no params

Incorrect generation of custom build method without any params.
This commit is contained in:
Jacques Pienaar 2020-09-23 07:50:45 -07:00
parent 8e84972ab7
commit 80deb1e106
1 changed files with 3 additions and 2 deletions

View File

@ -1191,8 +1191,9 @@ void OpEmitter::genBuilder() {
std::string paramStr =
skipParamGen ? params.str()
: llvm::formatv("::mlir::OpBuilder &{0}, "
"::mlir::OperationState &{1}, {2}",
builder, builderOpState, params)
"::mlir::OperationState &{1}{2}{3}",
builder, builderOpState,
params.empty() ? "" : ", ", params)
.str();
auto *method =
opClass.addMethodAndPrune("void", "build", properties, paramStr);