mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fixed class default initializers and type generation. Bug #260 is fixed.
This commit is contained in:
@@ -205,7 +205,11 @@ void DtoInitClass(TypeClass* tc, LLValue* dst)
|
||||
|
||||
// copy the rest from the static initializer
|
||||
LLValue* dstarr = DtoGEPi(dst,0,2,"tmp");
|
||||
LLValue* srcarr = DtoGEPi(tc->sym->ir.irStruct->getInitSymbol(),0,2,"tmp");
|
||||
|
||||
// init symbols might not have valid types
|
||||
LLValue* initsym = tc->sym->ir.irStruct->getInitSymbol();
|
||||
initsym = DtoBitCast(initsym, DtoType(tc));
|
||||
LLValue* srcarr = DtoGEPi(initsym,0,2,"tmp");
|
||||
|
||||
DtoMemCpy(dstarr, srcarr, DtoConstSize_t(n));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user