[llvm] [TableGen] Emit Debug code for dynamic bits(eg: instruction operands) in DecoderEmitter (PR #194699)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 22 07:33:52 PDT 2026


================
@@ -1517,6 +1567,36 @@ namespace {
 // on their usage.
 template <typename T> constexpr uint32_t InsnBitWidth = 0;
 
+#ifndef NDEBUG
+// Operand with no encoding fields: `Desc` is either "imm" (a constant
+// immediate) or "bits<0>" (no encoding at all).
+[[maybe_unused]] void reportOperandDecodeFailure(const char *Op,
----------------
jurahul wrote:

nit: in the 3 functions below, can we use `OperandName` and `InstName`?

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


More information about the llvm-commits mailing list