From 8feabfc5c61a1c31b142b1ed91836458f5cf81f1 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Thu, 16 Apr 2009 21:15:42 +0200 Subject: [PATCH] Make sure aggregates are resolved before outputting their debug info. --- gen/todebug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gen/todebug.cpp b/gen/todebug.cpp index b3601d6f..6b5a0bb3 100644 --- a/gen/todebug.cpp +++ b/gen/todebug.cpp @@ -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)