@@ -299,22 +299,22 @@ static std::string getOverloadKindStr(const Record *R) {
299299static std::string getConstraintString (const SmallVector<Record *> Recs) {
300300 std::string ConstraintString = " " ;
301301 std::string Prefix = " " ;
302- ConstraintString.append (" {{ " );
302+ ConstraintString.append (" {" );
303303 // If no constraints were specified, assume the operation
304304 // a) to be supported in SM 6.0 and later
305305 // b) has no overload types
306306 // c) is supported in all shader stage kinds
307307 if (Recs.empty ()) {
308308 ConstraintString.append (
309- " {6, 0}, OverloadKind::UNDEFINED, ShaderKind::allKinds}" );
309+ " {{ 6, 0}, OverloadKind::UNDEFINED, ShaderKind::allKinds} }" );
310310 }
311311 for (auto ConstrRec : Recs) {
312312 auto SMConstrRec = ConstrRec->getValueAsDef (" pred" );
313313 unsigned Major =
314314 SMConstrRec->getValueAsDef (" sm_version" )->getValueAsInt (" Major" );
315315 unsigned Minor =
316316 SMConstrRec->getValueAsDef (" sm_version" )->getValueAsInt (" Minor" );
317- ConstraintString.append (" {" )
317+ ConstraintString.append (Prefix). append ( " { {" )
318318 .append (std::to_string (Major))
319319 .append (" , " )
320320 .append (std::to_string (Minor).append (" }, " ));
@@ -364,6 +364,7 @@ static std::string getConstraintString(const SmallVector<Record *> Recs) {
364364 .append (" , " )
365365 .append (StageMaskString);
366366 ConstraintString.append (" }" );
367+ Prefix = " , " ;
367368 }
368369 ConstraintString.append (" }" );
369370 return ConstraintString;
0 commit comments