Fixed struct default initializers.

This commit is contained in:
Tomas Lindquist Olsen
2009-04-25 18:26:54 +02:00
parent d21cdb1df0
commit 3e882d422b
6 changed files with 163 additions and 45 deletions

View File

@@ -187,8 +187,7 @@ void DtoInitClass(TypeClass* tc, LLValue* dst)
{
tc->sym->codegen(Type::sir);
size_t presz = 2*getTypePaddedSize(DtoSize_t());
uint64_t n = getTypePaddedSize(tc->ir.type->get()) - presz;
uint64_t n = tc->sym->structsize - PTRSIZE * 2;
// set vtable field seperately, this might give better optimization
LLValue* tmp = DtoGEPi(dst,0,0,"vtbl");