[clang] [CIR] Mark record members as data, pad, or empty in CIRGen (PR #215175)
Adam Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 14 14:10:03 PDT 2026
================
@@ -576,8 +608,15 @@ CIRRecordLowering::accumulateBitFields(RecordDecl::field_iterator field,
assert(getSize(type) == accessSize &&
"Unclipped access must be clipped");
}
- members.push_back(
- makeStorageInfo(beginOffset, type, cir::RecordMemberKind::Data));
+ // An unnamed bit-field of any width occupies no ABI class, so a unit
+ // made up of nothing but those is declared storage holding no data.
+ const bool hasNamedOccupant = llvm::any_of(
----------------
adams381 wrote:
You were right to push on this. I've found a better shape by moving it into the loop that emits the unit rather than the span search.
https://github.com/llvm/llvm-project/pull/215175
More information about the cfe-commits
mailing list