[llvm] [RISCV]Add support for resolving encoding conflicts among vendor specific CSRs (PR #96174)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 04:20:04 PDT 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 e258bb38dc8f00cc366df877d0e6f869657b7a8b 5232d8c900750c4acc87b9cd8f65860656c1e43f -- llvm/utils/TableGen/SearchableTableEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/utils/TableGen/SearchableTableEmitter.cpp b/llvm/utils/TableGen/SearchableTableEmitter.cpp
index ad1aadfae3..dfb2b89ad8 100644
--- a/llvm/utils/TableGen/SearchableTableEmitter.cpp
+++ b/llvm/utils/TableGen/SearchableTableEmitter.cpp
@@ -432,12 +432,12 @@ void SearchableTableEmitter::emitLookupFunction(const GenericTable &Table,
   }
 
   if (ShouldReturnRange)
-    OS << "  " << IndexTypeName<< " Key;\n";
+    OS << "  " << IndexTypeName << " Key;\n";
   else {
     OS << "  struct KeyType {\n";
     for (const auto &Field : Index.Fields) {
       OS << "    " << searchableFieldType(Table, Index, Field, TypeInTempStruct)
-        << " " << Field.Name << ";\n";
+         << " " << Field.Name << ";\n";
     }
     OS << "  };\n";
     OS << "  KeyType Key = {";
@@ -576,12 +576,12 @@ void SearchableTableEmitter::emitGenericTable(const GenericTable &Table,
   // search can be performed by "Thing".
   if (Table.PrimaryKey) {
     auto &Index = Table.PrimaryKey;
-    emitLookupFunction(Table, *Index, /*IsPrimary=*/true,
-                       Index->ReturnRange, OS);
+    emitLookupFunction(Table, *Index, /*IsPrimary=*/true, Index->ReturnRange,
+                       OS);
   }
   for (const auto &Index : Table.Indices)
-    emitLookupFunction(Table, *Index, /*IsPrimary=*/false,
-                       Index->ReturnRange, OS);
+    emitLookupFunction(Table, *Index, /*IsPrimary=*/false, Index->ReturnRange,
+                       OS);
 
   OS << "#endif\n\n";
 }

``````````

</details>


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


More information about the llvm-commits mailing list