Fix bug #177 by not attempting to define composite debug info for

forward-declared structs.
This commit is contained in:
Christian Kamm
2009-01-23 13:41:03 +01:00
parent 783ec2799d
commit 343b80e718

View File

@@ -439,6 +439,11 @@ static LLGlobalVariable* dwarfCompositeType(Type* type, llvm::GlobalVariable* co
}
assert(sd);
// 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)
return NULL;
IrStruct* ir = sd->ir.irStruct;
assert(ir);
if (ir->dwarfComposite)