diff --git a/mlir/tools/mlir-tblgen/OpDocGen.cpp b/mlir/tools/mlir-tblgen/OpDocGen.cpp --- a/mlir/tools/mlir-tblgen/OpDocGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDocGen.cpp @@ -221,7 +221,12 @@ static void emitDialectDoc(const Dialect &dialect, ArrayRef ops, ArrayRef types, ArrayRef typeDefs, raw_ostream &os) { - os << "# '" << dialect.getName() << "' Dialect\n\n"; + os << "# '"; + if (dialect.getName().empty()) + os << "Builtin"; + else + os << dialect.getName(); + os << "' Dialect\n\n"; emitIfNotEmpty(dialect.getSummary(), os); emitIfNotEmpty(dialect.getDescription(), os);