Make sure aggregates are resolved before outputting their debug info.

This commit is contained in:
Tomas Lindquist Olsen 2009-04-16 21:15:42 +02:00
parent 948202a1a1
commit 8feabfc5c6

View file

@ -264,6 +264,9 @@ static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit
}
assert(sd);
// make sure it's resolved
sd->codegen(Type::sir);
// if we don't know the aggregate's size, we don't know enough about it
// to provide debug info. probably a forward-declared struct?
if (sd->sizeok == 0)