[clang] [CIR] Preserve annotate attributes on record declarations (PR #207551)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 17 01:14:19 PDT 2026


================
@@ -734,7 +734,7 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) {
   // Fill in the record *after* computing the base type.  Filling in the body
   // signifies that the type is no longer opaque and record layout is complete,
   // but we may need to recursively layout rd while laying D out as a base type.
-  assert(!cir::MissingFeatures::astRecordDeclAttr());
----------------
RedNicStone wrote:

Yea it dosent really support it fully, so removing it is somewhat overclaming.
Could keep the assertion and add `cgm.emitRecordAnnotations(rd, *ty);` above it (which does duplicate some code).
Depends on the latest review from Lancern though.

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


More information about the cfe-commits mailing list