[clang] [CIR] Model cir.is_fp_class flags as a bit-enum (PR #205941)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 07:03:03 PDT 2026


================
@@ -26,6 +26,12 @@ class CIR_I64EnumAttr<string name, string summary, list<I64EnumAttrCase> cases>
   let cppNamespace = "::cir";
 }
 
+class CIR_I32BitEnumAttr<string name, string summary,
----------------
erichkeane wrote:

I messed with it for a few minutes, I don't think we want to change anything about this.  All of the mlir `EnumAttr` types require that you specify the dialect everywhere when inheriting from it, which seems inappropriately heavy and at risk of being screwed up.  The namespace added makes it unnecessary to add everywhere, and this is effectively just an alias for it with 1 fewer argument, so IMO this is worth doing/leaving alone.

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


More information about the cfe-commits mailing list