Mercurial > projects > ldc
comparison gen/classes.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 | dd135ff697fa |
children | 15e9762bb620 |
comparison
equal
deleted
inserted
replaced
1308:316e9ecfeb7d | 1309:0c03ba6f7c24 |
---|---|
50 | 50 |
51 // create IrStruct | 51 // create IrStruct |
52 assert(cd->ir.irStruct == NULL); | 52 assert(cd->ir.irStruct == NULL); |
53 IrStruct* irstruct = new IrStruct(cd); | 53 IrStruct* irstruct = new IrStruct(cd); |
54 cd->ir.irStruct = irstruct; | 54 cd->ir.irStruct = irstruct; |
55 | |
56 // make sure all fields really get their ir field | |
57 ArrayIter<VarDeclaration> it(cd->fields); | |
58 for (; !it.done(); it.next()) | |
59 { | |
60 VarDeclaration* vd = it.get(); | |
61 if (vd->ir.irField == NULL) { | |
62 new IrField(vd); | |
63 } else { | |
64 IF_LOG Logger::println("class field already exists!!!"); | |
65 } | |
66 } | |
55 | 67 |
56 bool needs_def = mustDefineSymbol(cd); | 68 bool needs_def = mustDefineSymbol(cd); |
57 | 69 |
58 // emit the ClassZ symbol | 70 // emit the ClassZ symbol |
59 LLGlobalVariable* ClassZ = irstruct->getClassInfoSymbol(); | 71 LLGlobalVariable* ClassZ = irstruct->getClassInfoSymbol(); |