[llvm] [DRAFT][NFC] Make RegState enum class (PR #172441)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 16 09:09:27 PST 2025


================
@@ -39,10 +40,11 @@ namespace llvm {
 class MCInstrDesc;
 class MDNode;
 
-namespace RegState {
-
 // Keep this in sync with the table in MIRLangRef.rst.
-enum {
+enum class RegState : unsigned {
+  /// No Flags, used in initializers
+  NoFlags = 0x0,
----------------
lenary wrote:

I originally spelled it `None`, and am happy to back to that spelling. I ended up feeling it was clearer to say `NoFlags` because `None` sounds a bit to me like the value is not being used.

I will say I am glad `RegState` has the same number of letters as `unsigned` :)

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


More information about the llvm-commits mailing list