From 07e8fe490860a77d243360f9b32881cabc4a6fe0 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sun, 13 Oct 2013 21:52:21 +0200 Subject: [PATCH] Gracefully handle struct decl/type mismatch when generating TypeInfo. The type should have already been resolved if the struct itself is, but due to multiple-types-per-declaration issues in DMD, this might not be the case. GitHub: Fixes #470. --- gen/typinf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/typinf.cpp b/gen/typinf.cpp index 561cb516..d1394a05 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -618,7 +618,7 @@ void TypeInfoStructDeclaration::llvmDefine() initPtr = getNullValue(getVoidPtrType()); else initPtr = iraggr->getInitSymbol(); - b.push_void_array(getTypeStoreSize(tc->irtype->getLLType()), initPtr); + b.push_void_array(getTypeStoreSize(DtoType(tc)), initPtr); // toX functions ground work static TypeFunction *tftohash;