[llvm] [LLVM][TableGen][DecoderEmitter] Add wrapper class for `bit_value_t` (PR #146248)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 13:47:41 PDT 2025


================
@@ -252,84 +246,86 @@ class DecoderEmitter {
   StringRef PredicateNamespace;
 };
 
-} // end anonymous namespace
-
 // The set (BIT_TRUE, BIT_FALSE, BIT_UNSET) represents a ternary logic system
 // for a bit value.
 //
 // BIT_UNFILTERED is used as the init value for a filter position.  It is used
 // only for filter processings.
-typedef enum : uint8_t {
-  BIT_FALSE,     // '0'
-  BIT_TRUE,      // '1'
-  BIT_UNSET,     // '?'
-  BIT_UNFILTERED // unfiltered
-} bit_value_t;
-
-static bool ValueSet(bit_value_t V) {
-  return (V == BIT_TRUE || V == BIT_FALSE);
-}
+class BitValue {
+public:
----------------
jurahul wrote:

Done

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


More information about the llvm-commits mailing list