Mercurial > projects > ldc
comparison gen/toir.cpp @ 671:96e425004a68
When newing a struct, make sure the initializer is available.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 08 Oct 2008 20:41:43 +0200 |
parents | 9c48213cfd96 |
children | 518b8cc84369 |
comparison
equal
deleted
inserted
replaced
669:92ec7487a1a0 | 671:96e425004a68 |
---|---|
1510 if (ts->isZeroInit()) { | 1510 if (ts->isZeroInit()) { |
1511 DtoAggrZeroInit(mem); | 1511 DtoAggrZeroInit(mem); |
1512 } | 1512 } |
1513 else { | 1513 else { |
1514 assert(ts->sym); | 1514 assert(ts->sym); |
1515 DtoForceConstInitDsymbol(ts->sym); | |
1515 DtoAggrCopy(mem,ts->sym->ir.irStruct->init); | 1516 DtoAggrCopy(mem,ts->sym->ir.irStruct->init); |
1516 } | 1517 } |
1517 return new DImValue(type, mem); | 1518 return new DImValue(type, mem); |
1518 } | 1519 } |
1519 // new basic type | 1520 // new basic type |