[llvm] [TableGen][DecoderEmitter] Add option to emit type-specialized `decodeToMCInst` (PR #146593)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 11 18:02:32 PDT 2025


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 HEAD~1 HEAD --extensions cpp,h -- llvm/lib/TableGen/Record.cpp llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h llvm/utils/TableGen/DecoderEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index d0f47bdb0..620928ef4 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -3140,8 +3140,8 @@ Record::getValueAsListOfStrings(StringRef FieldName) const {
     if (const auto *SI = dyn_cast<StringInit>(I))
       Strings.push_back(SI->getValue());
     else
-      PrintFatalError(getLoc(), 
-                      Twine("Record `") + getName() + "', field `" + FieldName +
+      PrintFatalError(
+          getLoc(), Twine("Record `") + getName() + "', field `" + FieldName +
                         "' exists but does not have a list of strings value: " +
                         I->getAsString());
   }
diff --git a/llvm/utils/TableGen/DecoderEmitter.cpp b/llvm/utils/TableGen/DecoderEmitter.cpp
index a1acff09e..4502f49b1 100644
--- a/llvm/utils/TableGen/DecoderEmitter.cpp
+++ b/llvm/utils/TableGen/DecoderEmitter.cpp
@@ -1079,7 +1079,6 @@ void DecoderEmitter::emitPredicateFunction(formatted_raw_ostream &OS,
   OS << "}\n\n";
 }
 
-
 // ----------------------------------------------------------------------------
 // CPPType implementation.
 

``````````

</details>


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


More information about the llvm-commits mailing list