@@ -40,7 +40,8 @@ struct DXILIntrinsicSelect {
4040static StringRef StripIntrinArgSelectTypePrefix (StringRef Type) {
4141 StringRef Prefix = " IntrinArgSelect_" ;
4242 if (!Type.starts_with (Prefix)) {
43- PrintFatalError (" IntrinArgSelectType definintion must be prefixed with 'IntrinArgSelect_'" );
43+ PrintFatalError (" IntrinArgSelectType definintion must be prefixed with "
44+ " 'IntrinArgSelect_'" );
4445 }
4546 return Type.substr (Prefix.size ());
4647}
@@ -421,11 +422,12 @@ static void emitDXILIntrinsicMap(ArrayRef<DXILOperationDesc> Ops,
421422 OS << " DXIL_OP_INTRINSIC(dxil::OpCode::" << Op.OpName
422423 << " , Intrinsic::" << MappedIntr.Intrinsic << " , " ;
423424 for (const Record *ArgSelect : MappedIntr.ArgSelectRecords ) {
424- std::string Type = ArgSelect->getValueAsDef (" type" )->getNameInitAsString ();
425+ std::string Type =
426+ ArgSelect->getValueAsDef (" type" )->getNameInitAsString ();
425427 int Value = ArgSelect->getValueAsInt (" value" );
426428 OS << " (IntrinArgSelect{"
427- << " IntrinArgSelect::Type::" << StripIntrinArgSelectTypePrefix (Type) << " , "
428- << Value << " }), " ;
429+ << " IntrinArgSelect::Type::" << StripIntrinArgSelectTypePrefix (Type)
430+ << " , " << Value << " }), " ;
429431 }
430432 OS << " )\n " ;
431433 }
@@ -435,11 +437,14 @@ static void emitDXILIntrinsicMap(ArrayRef<DXILOperationDesc> Ops,
435437 OS << " #endif\n\n " ;
436438}
437439
438- static void emitDXILIntrinsicArgSelectTypes (const RecordKeeper &Records, raw_ostream &OS) {
440+ // / Emit the IntrinArgSelect type for DirectX intrinsic to DXIL Op lowering
441+ static void emitDXILIntrinsicArgSelectTypes (const RecordKeeper &Records,
442+ raw_ostream &OS) {
439443 OS << " #ifdef DXIL_OP_INTRINSIC_ARG_SELECT_TYPES\n " ;
440444 OS << " struct IntrinArgSelect {\n " ;
441445 OS << " enum class Type {\n " ;
442- for (const Record *Records : Records.getAllDerivedDefinitions (" IntrinArgSelectType" )) {
446+ for (const Record *Records :
447+ Records.getAllDerivedDefinitions (" IntrinArgSelectType" )) {
443448 StringRef StrippedName = StripIntrinArgSelectTypePrefix (Records->getName ());
444449 OS << " " << StrippedName << " ,\n " ;
445450 }
0 commit comments