Mercurial > projects > ldc
diff ir/irtypeclass.cpp @ 1309:0c03ba6f7c24
Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Thu, 07 May 2009 02:10:29 +0200 |
parents | 8fb39f7f1a7c |
children | 49fd0c8040e6 |
line wrap: on
line diff
--- a/ir/irtypeclass.cpp Wed May 06 20:29:27 2009 +0200 +++ b/ir/irtypeclass.cpp Thu May 07 02:10:29 2009 +0200 @@ -159,22 +159,8 @@ 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?