comparison gen/todebug.cpp @ 904:01d9ece9982a

Fix bug #177 by not attempting to define composite debug info for forward-declared structs.
author Christian Kamm <kamm incasoftware de>
date Fri, 23 Jan 2009 13:41:03 +0100
parents 8e6135be6999
children 1714836f2c0b
comparison
equal deleted inserted replaced
903:493d42562733 904:01d9ece9982a
436 { 436 {
437 TypeClass* tc = (TypeClass*)t; 437 TypeClass* tc = (TypeClass*)t;
438 sd = tc->sym; 438 sd = tc->sym;
439 } 439 }
440 assert(sd); 440 assert(sd);
441
442 // if we don't know the aggregate's size, we don't know enough about it
443 // to provide debug info. probably a forward-declared struct?
444 if (sd->sizeok == 0)
445 return NULL;
441 446
442 IrStruct* ir = sd->ir.irStruct; 447 IrStruct* ir = sd->ir.irStruct;
443 assert(ir); 448 assert(ir);
444 if (ir->dwarfComposite) 449 if (ir->dwarfComposite)
445 return ir->dwarfComposite; 450 return ir->dwarfComposite;