[llvm] [DirectX][NFC] Change usage pattern DXIL* to Dxil* in DXIL Emitter (PR #80778)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 17:20:24 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 4b6062619acf1cdc7b426520dd908d9fab70ed49 42ef78c40830280b822413e1ebc131c5f7f4e86e -- llvm/utils/TableGen/DXILEmitter.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/utils/TableGen/DXILEmitter.cpp b/llvm/utils/TableGen/DXILEmitter.cpp
index 708ad37e44..af0bb7ec1c 100644
--- a/llvm/utils/TableGen/DXILEmitter.cpp
+++ b/llvm/utils/TableGen/DXILEmitter.cpp
@@ -43,8 +43,8 @@ struct DxilParameter {
 
 struct DxilOperationDesc {
   StringRef OpName;    // name of DXIL operation
-  int OpCode;        // ID of DXIL operation
-  StringRef OpClass; // name of the opcode class
+  int OpCode;          // ID of DXIL operation
+  StringRef OpClass;   // name of the opcode class
   StringRef Category;  // classification for this instruction
   StringRef Doc;       // the documentation description of this instruction
 
@@ -165,8 +165,7 @@ static std::string parameterKindToString(ParameterKind Kind) {
 
 static void emitDxilOpEnum(DxilOperationDesc &Op, raw_ostream &OS) {
   // Name = ID, // Doc
-  OS << Op.OpName << " = " << Op.OpCode << ", // " << Op.Doc
-     << "\n";
+  OS << Op.OpName << " = " << Op.OpCode << ", // " << Op.Doc << "\n";
 }
 
 static std::string buildCategoryStr(StringSet<> &Cetegorys) {
@@ -260,8 +259,8 @@ static void emitDxilIntrinsicMap(std::vector<DxilOperationDesc> &Ops,
     if (Op.Intrinsic.empty())
       continue;
     // {Intrinsic::sin, dxil::OpCode::Sin},
-    OS << "  { Intrinsic::" << Op.Intrinsic
-       << ", dxil::OpCode::" << Op.OpName << "},\n";
+    OS << "  { Intrinsic::" << Op.Intrinsic << ", dxil::OpCode::" << Op.OpName
+       << "},\n";
   }
   OS << "};\n";
   OS << "\n";
@@ -366,12 +365,11 @@ static void emitDxilOperationTable(std::vector<DxilOperationDesc> &Ops,
   OS << "  static const OpCodeProperty OpCodeProps[] = {\n";
   for (auto &Op : Ops) {
     OS << "  { dxil::OpCode::" << Op.OpName << ", "
-       << OpStrings.get(Op.OpName.str())
-       << ", OpCodeClass::" << Op.OpClass << ", "
-       << OpClassStrings.get(getDxilOpClassName(Op.OpClass)) << ", "
+       << OpStrings.get(Op.OpName.str()) << ", OpCodeClass::" << Op.OpClass
+       << ", " << OpClassStrings.get(getDxilOpClassName(Op.OpClass)) << ", "
        << getDxilOperationOverload(Op.OverloadTypes) << ", "
-       << emitDxilOperationFnAttr(Op.FnAttr) << ", "
-       << Op.OverloadParamIndex << ", " << Op.Params.size() << ", "
+       << emitDxilOperationFnAttr(Op.FnAttr) << ", " << Op.OverloadParamIndex
+       << ", " << Op.Params.size() << ", "
        << Parameters.get(ParameterMap[Op.OpClass]) << " },\n";
   }
   OS << "  };\n";

``````````

</details>


https://github.com/llvm/llvm-project/pull/80778


More information about the llvm-commits mailing list