Fix DMD Issue 10451 - Array of pointers to opaque struct gives forward reference errors.

This commit is contained in:
Alexey Prokhin
2013-12-08 14:43:27 +04:00
parent 9e724b3f9a
commit 89573a731a

View File

@@ -601,6 +601,13 @@ void TypeInfoStructDeclaration::llvmDefine()
TypeStruct *tc = static_cast<TypeStruct *>(tinfo);
StructDeclaration *sd = tc->sym;
// handle opaque structs
if (!sd->members) {
RTTIBuilder b(Type::typeinfostruct);
b.finalize(ir.irGlobal);
return;
}
// can't emit typeinfo for forward declarations
if (sd->sizeok != SIZEOKdone)
{