Mercurial > projects > ldc
comparison gen/structs.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 | c8b9406d84ca |
comparison
equal
deleted
inserted
replaced
1308:316e9ecfeb7d | 1309:0c03ba6f7c24 |
---|---|
41 return; | 41 return; |
42 | 42 |
43 // create the IrStruct | 43 // create the IrStruct |
44 IrStruct* irstruct = new IrStruct(sd); | 44 IrStruct* irstruct = new IrStruct(sd); |
45 sd->ir.irStruct = irstruct; | 45 sd->ir.irStruct = irstruct; |
46 | |
47 // make sure all fields really get their ir field | |
48 ArrayIter<VarDeclaration> it(sd->fields); | |
49 for (; !it.done(); it.next()) | |
50 { | |
51 VarDeclaration* vd = it.get(); | |
52 if (vd->ir.irField == NULL) { | |
53 new IrField(vd); | |
54 } else { | |
55 IF_LOG Logger::println("struct field already exists!!!"); | |
56 } | |
57 } | |
46 | 58 |
47 // perform definition | 59 // perform definition |
48 bool needs_def = mustDefineSymbol(sd); | 60 bool needs_def = mustDefineSymbol(sd); |
49 if (needs_def) | 61 if (needs_def) |
50 { | 62 { |