Mercurial > projects > ldc
comparison gen/structs.cpp @ 803:c62c6936635b
Removed DtoConstFieldInitializer, it's no longer needed and was buggy.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 29 Nov 2008 21:26:50 +0100 |
parents | 28ce72c60a21 |
children | 69a5e4a6fc0f |
comparison
equal
deleted
inserted
replaced
802:28ce72c60a21 | 803:c62c6936635b |
---|---|
206 } | 206 } |
207 | 207 |
208 // do the default | 208 // do the default |
209 Logger::println("adding default field: %s : +%u", nextdef->toChars(), nextdef->offset); | 209 Logger::println("adding default field: %s : +%u", nextdef->toChars(), nextdef->offset); |
210 if (!nextdef->ir.irField->constInit) | 210 if (!nextdef->ir.irField->constInit) |
211 nextdef->ir.irField->constInit = DtoConstFieldInitializer(nextdef->loc, nextdef->type, nextdef->init); | 211 nextdef->ir.irField->constInit = DtoConstInitializer(nextdef->loc, nextdef->type, nextdef->init); |
212 LLConstant* c = nextdef->ir.irField->constInit; | 212 LLConstant* c = nextdef->ir.irField->constInit; |
213 inits.push_back(c); | 213 inits.push_back(c); |
214 | 214 |
215 // update offsets | 215 // update offsets |
216 lastoffset = nextdef->offset; | 216 lastoffset = nextdef->offset; |
261 } | 261 } |
262 | 262 |
263 // do the default | 263 // do the default |
264 Logger::println("adding default field: %s : +%u", nextdef->toChars(), nextdef->offset); | 264 Logger::println("adding default field: %s : +%u", nextdef->toChars(), nextdef->offset); |
265 if (!nextdef->ir.irField->constInit) | 265 if (!nextdef->ir.irField->constInit) |
266 nextdef->ir.irField->constInit = DtoConstFieldInitializer(nextdef->loc, nextdef->type, nextdef->init); | 266 nextdef->ir.irField->constInit = DtoConstInitializer(nextdef->loc, nextdef->type, nextdef->init); |
267 LLConstant* c = nextdef->ir.irField->constInit; | 267 LLConstant* c = nextdef->ir.irField->constInit; |
268 inits.push_back(c); | 268 inits.push_back(c); |
269 | 269 |
270 // update offsets | 270 // update offsets |
271 lastoffset = nextdef->offset; | 271 lastoffset = nextdef->offset; |