@@ -323,11 +323,11 @@ static std::string getStageMaskString(ArrayRef<const Record *> Recs) {
323
323
static void emitDXILVersions (const RecordKeeper &Records, raw_ostream &OS) {
324
324
OS << " #ifdef DXIL_VERSION\n " ;
325
325
for (const Record *Version : Records.getAllDerivedDefinitions (" Version" )) {
326
- unsigned Major = Version->getValueAsInt (" Major" );
327
- unsigned Minor = Version->getValueAsInt (" Minor" );
328
- OS << " DXIL_VERSION(" ;
329
- OS << std::to_string (Major) << " , " << std::to_string (Minor);
330
- OS << " )\n " ;
326
+ unsigned Major = Version->getValueAsInt (" Major" );
327
+ unsigned Minor = Version->getValueAsInt (" Minor" );
328
+ OS << " DXIL_VERSION(" ;
329
+ OS << std::to_string (Major) << " , " << std::to_string (Minor);
330
+ OS << " )\n " ;
331
331
}
332
332
OS << " #undef DXIL_VERSION\n " ;
333
333
OS << " #endif\n\n " ;
@@ -372,7 +372,8 @@ static void emitDXILAttributes(const RecordKeeper &Records, raw_ostream &OS) {
372
372
}
373
373
374
374
// Determine which function attributes are set for a dxil version
375
- static bool attrIsDefined (std::vector<const Record *> Attrs, const Record *Attr) {
375
+ static bool attrIsDefined (std::vector<const Record *> Attrs,
376
+ const Record *Attr) {
376
377
for (auto CurAttr : Attrs)
377
378
if (CurAttr->getName () == Attr->getName ())
378
379
return true ;
@@ -386,20 +387,22 @@ static void emitDXILOpAttributes(const RecordKeeper &Records,
386
387
OS << " #ifdef DXIL_OP_ATTRIBUTES\n " ;
387
388
for (const auto &Op : Ops) {
388
389
for (const auto *Rec : Op.AttrRecs ) {
389
- unsigned Major = Rec->getValueAsDef (" dxil_version" )->getValueAsInt (" Major" );
390
- unsigned Minor = Rec->getValueAsDef (" dxil_version" )->getValueAsInt (" Minor" );
390
+ unsigned Major =
391
+ Rec->getValueAsDef (" dxil_version" )->getValueAsInt (" Major" );
392
+ unsigned Minor =
393
+ Rec->getValueAsDef (" dxil_version" )->getValueAsInt (" Minor" );
391
394
OS << " DXIL_OP_ATTRIBUTES(dxil::OpCode::" << Op.OpName << " , " ;
392
395
OS << std::to_string (Major) << " , " << std::to_string (Minor);
393
396
auto Attrs = Rec->getValueAsListOfDefs (" fn_attrs" );
394
- for (const Record *Attr : Records.getAllDerivedDefinitions (" DXILAttribute" )) {
397
+ for (const Record *Attr :
398
+ Records.getAllDerivedDefinitions (" DXILAttribute" )) {
395
399
std::string HasAttr = " , false" ;
396
400
if (attrIsDefined (Attrs, Attr))
397
401
HasAttr = " , true" ;
398
402
OS << HasAttr;
399
403
}
400
404
OS << " )\n " ;
401
405
}
402
-
403
406
}
404
407
OS << " #undef DXIL_OP_ATTRIBUTES\n " ;
405
408
OS << " #endif\n\n " ;
@@ -509,8 +512,7 @@ static void emitDXILOperationTable(ArrayRef<DXILOperationDesc> Ops,
509
512
<< OpStrings.get (Op.OpName ) << " , OpCodeClass::" << Op.OpClass << " , "
510
513
<< OpClassStrings.get (Op.OpClass .data ()) << " , "
511
514
<< getOverloadMaskString (Op.OverloadRecs ) << " , "
512
- << getStageMaskString (Op.StageRecs ) << " , "
513
- << Op.OverloadParamIndex
515
+ << getStageMaskString (Op.StageRecs ) << " , " << Op.OverloadParamIndex
514
516
<< " }" ;
515
517
Prefix = " ,\n " ;
516
518
}
0 commit comments