Mercurial > projects > ldc
comparison gen/todebug.cpp @ 1237:73b56541152c
Make sure aggregates are resolved before outputting their debug info.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 16 Apr 2009 21:15:42 +0200 |
parents | 79758fd2f48a |
children | 0686701178d3 |
comparison
equal
deleted
inserted
replaced
1236:57db55766118 | 1237:73b56541152c |
---|---|
261 { | 261 { |
262 TypeClass* tc = (TypeClass*)t; | 262 TypeClass* tc = (TypeClass*)t; |
263 sd = tc->sym; | 263 sd = tc->sym; |
264 } | 264 } |
265 assert(sd); | 265 assert(sd); |
266 | |
267 // make sure it's resolved | |
268 sd->codegen(Type::sir); | |
266 | 269 |
267 // if we don't know the aggregate's size, we don't know enough about it | 270 // if we don't know the aggregate's size, we don't know enough about it |
268 // to provide debug info. probably a forward-declared struct? | 271 // to provide debug info. probably a forward-declared struct? |
269 if (sd->sizeok == 0) | 272 if (sd->sizeok == 0) |
270 return llvm::DICompositeType(NULL); | 273 return llvm::DICompositeType(NULL); |