changeset 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 493d42562733
children bd000a7fab18
files gen/todebug.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/todebug.cpp	Fri Jan 23 10:13:27 2009 +0100
+++ b/gen/todebug.cpp	Fri Jan 23 13:41:03 2009 +0100
@@ -439,6 +439,11 @@
         }
         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)