mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Fixed class default initializers and type generation. Bug #260 is fixed.
This commit is contained in:
parent
3bd5cf70c2
commit
ba38e15f0d
9 changed files with 169 additions and 44 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue