[clang] [CIR] Initial support for sanitizer attributes (PR #220625)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 3 01:53:38 PDT 2026
================
@@ -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:
Also a bit unfortunate at present design is that MLIR uniques attributes structurally, #cir.sanitize<[address, thread]> and #cir.sanitize<[thread, address]> are two distinct attributes denoting the same set, and the verifier rejects duplicates but not ordering. Attribute equality then depends on the order CIRGen happened to push kinds in.
https://github.com/llvm/llvm-project/pull/220625
More information about the cfe-commits
mailing list