Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 .

This commit is contained in:
Tomas Lindquist Olsen
2009-05-07 02:10:29 +02:00
parent 7f07cf02ad
commit ca4f588c08
8 changed files with 54 additions and 40 deletions

View File

@@ -159,22 +159,8 @@ void IrTypeClass::addBaseClassData(
offset = vd->offset + vd->type->size();
// create ir field
if (vd->ir.irField == NULL)
new IrField(vd, field_index);
else
assert(vd->ir.irField->index == field_index &&
vd->ir.irField->unionOffset == 0 &&
"inconsistent field data");
field_index++;
}
// make sure all fields really get their ir field
ArrayIter<VarDeclaration> it(base->fields);
for (; !it.done(); it.next())
{
VarDeclaration* vd = it.get();
if (vd->ir.irField == NULL)
new IrField(vd, 0, vd->offset);
vd->aggrIndex = (unsigned)field_index;
++field_index;
}
// any interface implementations?