[clang] [CIR] Preserve annotate attributes on record declarations (PR #207551)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 26 09:33:05 PDT 2026
================
@@ -48,6 +48,12 @@ struct StructTypeStorage : public mlir::TypeStorage {
bool padded;
bool is_class;
+ // Annotations are payload set at completion (like members/layout), not part
+ // of the type's identity: named records are uniqued by name, so there is at
+ // most one annotation set per type. Keeping them out of the key is also
+ // required so an incomplete record can be completed in place.
----------------
RedNicStone wrote:
```diff
+ // Array of #cir.annotation attributes, set at completion (like
+ // members/layout), not part of the type's identity: named records are
+ // uniqued by name, so there is at most one annotation set per type. Keeping
+ // them out of the key is also required so an incomplete record can be
+ // completed in place.
```
Sounds good. Would this do the job?
https://github.com/llvm/llvm-project/pull/207551
More information about the cfe-commits
mailing list