[llvm] [TableGen] Implement getOperandIdxName (PR #154944)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 12:52:07 PDT 2025


================
@@ -296,42 +378,22 @@ void InstrInfoEmitter::emitOperandNameMappings(
   OS << "}; // enum class OpName\n\n";
   OS << "LLVM_READONLY\n";
   OS << "int16_t getNamedOperandIdx(uint16_t Opcode, OpName Name);\n";
+  OS << "LLVM_READONLY\n";
----------------
jurahul wrote:

nit: This and the earlier declaration can be emitted as a single line. No reason to have LLVM_READONLY on a separate line in the generated  code.

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


More information about the llvm-commits mailing list