================
@@ -2136,6 +2136,35 @@ def CIR_AnnotationArrayAttr
     : CIR_TypedArrayAttrBase<CIR_AnnotationAttr,
                              "array of cir.annotation attributes">;
 
+//===----------------------------------------------------------------------===//
+// SanitizeAttr
+//===----------------------------------------------------------------------===//
+
+def CIR_SanitizeKind : CIR_I32EnumAttr<"SanitizeKind", "sanitize kind", [
+  I32EnumAttrCase<"Address", 0, "address">,
+]> {
+  let genSpecializedAttr = 0;
+}
+
+def CIR_SanitizeAttr : CIR_Attr<"Sanitize", "sanitize"> {
----------------
xlauko wrote:

Why an array of kinds rather than a bit enum? A duplicate-free set of flags is 
what `I64BitEnumAttr` is for, and modeling it that way would delete most of 
this patch: the `SanitizeAttr` class, the 
`genVerifyDecl`/`SanitizeAttr::verify` duplicate check, the 
`clang/test/CIR/IR/sanitize.cir `test that exists only to exercise it, and 
format. It would also make the cir.func spelling sanitize(address) via the 
existing `parseCIRKeyword` helper instead of the less readable 
`sanitize(#cir.sanitize<[address]>)`.

https://github.com/llvm/llvm-project/pull/220625
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to