@@ -371,9 +371,11 @@ class OpenACCClauseCIREmitter final
371371 } else if constexpr (std::is_same_v<RecipeTy,
372372 mlir::acc::ReductionRecipeOp>) {
373373 stream << " reduction_" ;
374- // We don't have the reduction operation here well enough to know how to
375- // spell this correctly (+ == 'add', etc), so when we implement
376- // 'reduction' we have to do that here.
374+ // TODO: OpenACC: once we have this part implemented, we can remove the
375+ // SourceRange `loc` variable from this function. We don't have the
376+ // reduction operation here well enough to know how to spell this
377+ // correctly (+ == 'add', etc), so when we implement 'reduction' we have
378+ // to do that here.
377379 cgf.cgm .errorNYI (loc, " OpenACC reduction recipe name creation" );
378380 } else {
379381 static_assert (!sizeof (RecipeTy), " Unknown Recipe op kind" );
@@ -410,10 +412,8 @@ class OpenACCClauseCIREmitter final
410412
411413 // Do the 'init' section of the recipe IR, which does an alloca, then the
412414 // initialization (except for firstprivate).
413- llvm::SmallVector<mlir::Type> argsTys{mainOp.getType ()};
414- llvm::SmallVector<mlir::Location> argsLocs{loc};
415415 builder.createBlock (&recipe.getInitRegion (), recipe.getInitRegion ().end (),
416- argsTys, argsLocs );
416+ {mainOp. getType ()}, {loc} );
417417 builder.setInsertionPointToEnd (&recipe.getInitRegion ().back ());
418418 tempDeclEmission =
419419 cgf.emitAutoVarAlloca (*varRecipe, builder.saveInsertionPoint ());
@@ -463,11 +463,8 @@ class OpenACCClauseCIREmitter final
463463 mlir::Value mainOp, CharUnits alignment,
464464 QualType baseType,
465465 mlir::Region &destroyRegion) {
466- llvm::SmallVector<mlir::Type> argsTys{mainOp.getType ()};
467- llvm::SmallVector<mlir::Location> argsLocs{loc};
468-
469466 mlir::Block *block = builder.createBlock (
470- &destroyRegion, destroyRegion.end (), argsTys, argsLocs );
467+ &destroyRegion, destroyRegion.end (), {mainOp. getType ()}, {loc} );
471468 builder.setInsertionPointToEnd (&destroyRegion.back ());
472469
473470 mlir::Type elementTy =
0 commit comments