File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
9595 return getZeroAttr (arrTy);
9696 if (auto ptrTy = mlir::dyn_cast<cir::PointerType>(ty))
9797 return getConstNullPtrAttr (ptrTy);
98- if (auto RecordTy = mlir::dyn_cast<cir::RecordType>(ty))
99- return getZeroAttr (RecordTy );
98+ if (auto recordTy = mlir::dyn_cast<cir::RecordType>(ty))
99+ return getZeroAttr (recordTy );
100100 if (mlir::isa<cir::BoolType>(ty)) {
101101 return getCIRBoolAttr (false );
102102 }
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ struct MissingFeatures {
110110 static bool packedRecords () { return false ; }
111111 static bool recordPadding () { return false ; }
112112 static bool recordZeroInit () { return false ; }
113+ static bool zeroSizeRecordMembers () { return false ; }
113114
114115 // Misc
115116 static bool cxxABI () { return false ; }
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ void CIRRecordLowering::accumulateFields() {
180180 ++field;
181181 } else {
182182 // TODO(cir): do we want to do anything special about zero size members?
183+ assert (!cir::MissingFeatures::zeroSizeRecordMembers ());
183184 ++field;
184185 }
185186 }
You can’t perform that action at this time.
0 commit comments