@@ -299,22 +299,22 @@ static std::string getOverloadKindStr(const Record *R) {
299
299
static std::string getConstraintString (const SmallVector<Record *> Recs) {
300
300
std::string ConstraintString = " " ;
301
301
std::string Prefix = " " ;
302
- ConstraintString.append (" {{ " );
302
+ ConstraintString.append (" {" );
303
303
// If no constraints were specified, assume the operation
304
304
// a) to be supported in SM 6.0 and later
305
305
// b) has no overload types
306
306
// c) is supported in all shader stage kinds
307
307
if (Recs.empty ()) {
308
308
ConstraintString.append (
309
- " {6, 0}, OverloadKind::UNDEFINED, ShaderKind::allKinds}" );
309
+ " {{ 6, 0}, OverloadKind::UNDEFINED, ShaderKind::allKinds} }" );
310
310
}
311
311
for (auto ConstrRec : Recs) {
312
312
auto SMConstrRec = ConstrRec->getValueAsDef (" pred" );
313
313
unsigned Major =
314
314
SMConstrRec->getValueAsDef (" sm_version" )->getValueAsInt (" Major" );
315
315
unsigned Minor =
316
316
SMConstrRec->getValueAsDef (" sm_version" )->getValueAsInt (" Minor" );
317
- ConstraintString.append (" {" )
317
+ ConstraintString.append (Prefix). append ( " { {" )
318
318
.append (std::to_string (Major))
319
319
.append (" , " )
320
320
.append (std::to_string (Minor).append (" }, " ));
@@ -364,6 +364,7 @@ static std::string getConstraintString(const SmallVector<Record *> Recs) {
364
364
.append (" , " )
365
365
.append (StageMaskString);
366
366
ConstraintString.append (" }" );
367
+ Prefix = " , " ;
367
368
}
368
369
ConstraintString.append (" }" );
369
370
return ConstraintString;
0 commit comments