Skip to content

Commit 07e8fe4

Browse files
committed
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 ldc-developers#470.
1 parent 07eec18 commit 07e8fe4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gen/typinf.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ void TypeInfoStructDeclaration::llvmDefine()
618618
initPtr = getNullValue(getVoidPtrType());
619619
else
620620
initPtr = iraggr->getInitSymbol();
621-
b.push_void_array(getTypeStoreSize(tc->irtype->getLLType()), initPtr);
621+
b.push_void_array(getTypeStoreSize(DtoType(tc)), initPtr);
622622

623623
// toX functions ground work
624624
static TypeFunction *tftohash;

0 commit comments

Comments
 (0)