diff --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp --- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp +++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp @@ -695,7 +695,7 @@ /// {0}: The name of the region list. const char *regionListEnsureSingleBlockParserCode = R"( for (auto ®ion : {0}Regions) - if (region.empty()) *{0}Region.emplaceBlock(); + if (region->empty()) region->emplaceBlock(); )"; /// The code snippet used to generate a parser call for an optional region.