================
@@ -769,6 +826,12 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd,
cir::RecordType *ty) {
// size and so needs no such exemption.)
assert((rd->isUnion() || lowering.packed == baseLowering.packed) &&
"Non-virtual and complete types must agree on packedness");
+ // Emptiness is a property of the decl, so the base subobject must answer
+ // the same way the complete object does. The two are not comparable
+ // mark by mark: they see different sizes and so different tail padding.
+ assert((marksMatchABIEmptiness(astContext, rd, baseTy) ||
+ cgm.getDiags().hasErrorOccurred()) &&
----------------
erichkeane wrote:
An assert after NYI error is common/acceptable, I wouldn't even bother checking
them, and let teh assert fire.
https://github.com/llvm/llvm-project/pull/215175
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits