Fixed problems introduced by previous commits that prevented Tango from compiling.

This commit is contained in:
Tomas Lindquist Olsen
2009-03-27 23:17:04 +01:00
parent ec986231e5
commit be3bfbff5d
8 changed files with 63 additions and 44 deletions

View File

@@ -84,6 +84,9 @@ void VarDeclaration::codegen(Ir* p)
return;
}
if (AggregateDeclaration* ad = isMember())
ad->codegen(p);
// global variable or magic
#if DMDV2
// taken from dmd2/structs
@@ -135,7 +138,12 @@ void VarDeclaration::codegen(Ir* p)
if (nakedUse)
gIR->usedArray.push_back(DtoBitCast(gvar, getVoidPtrType()));
DtoConstInitGlobal(this);
// don't initialize static struct members yet, they might be of the struct type
// which doesn't have a static initializer yet.
if (AggregateDeclaration* ad = isMember())
ad->ir.irStruct->staticVars.push_back(this);
else
DtoConstInitGlobal(this);
}
else
{