@@ -323,11 +323,11 @@ static std::string getStageMaskString(ArrayRef<const Record *> Recs) {
323323static void emitDXILVersions (const RecordKeeper &Records, raw_ostream &OS) {
324324 OS << " #ifdef DXIL_VERSION\n " ;
325325 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 " ;
331331 }
332332 OS << " #undef DXIL_VERSION\n " ;
333333 OS << " #endif\n\n " ;
@@ -372,7 +372,8 @@ static void emitDXILAttributes(const RecordKeeper &Records, raw_ostream &OS) {
372372}
373373
374374// 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) {
376377 for (auto CurAttr : Attrs)
377378 if (CurAttr->getName () == Attr->getName ())
378379 return true ;
@@ -386,20 +387,22 @@ static void emitDXILOpAttributes(const RecordKeeper &Records,
386387 OS << " #ifdef DXIL_OP_ATTRIBUTES\n " ;
387388 for (const auto &Op : Ops) {
388389 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" );
391394 OS << " DXIL_OP_ATTRIBUTES(dxil::OpCode::" << Op.OpName << " , " ;
392395 OS << std::to_string (Major) << " , " << std::to_string (Minor);
393396 auto Attrs = Rec->getValueAsListOfDefs (" fn_attrs" );
394- for (const Record *Attr : Records.getAllDerivedDefinitions (" DXILAttribute" )) {
397+ for (const Record *Attr :
398+ Records.getAllDerivedDefinitions (" DXILAttribute" )) {
395399 std::string HasAttr = " , false" ;
396400 if (attrIsDefined (Attrs, Attr))
397401 HasAttr = " , true" ;
398402 OS << HasAttr;
399403 }
400404 OS << " )\n " ;
401405 }
402-
403406 }
404407 OS << " #undef DXIL_OP_ATTRIBUTES\n " ;
405408 OS << " #endif\n\n " ;
@@ -509,8 +512,7 @@ static void emitDXILOperationTable(ArrayRef<DXILOperationDesc> Ops,
509512 << OpStrings.get (Op.OpName ) << " , OpCodeClass::" << Op.OpClass << " , "
510513 << OpClassStrings.get (Op.OpClass .data ()) << " , "
511514 << getOverloadMaskString (Op.OverloadRecs ) << " , "
512- << getStageMaskString (Op.StageRecs ) << " , "
513- << Op.OverloadParamIndex
515+ << getStageMaskString (Op.StageRecs ) << " , " << Op.OverloadParamIndex
514516 << " }" ;
515517 Prefix = " ,\n " ;
516518 }
0 commit comments