# HG changeset patch # User Tomas Lindquist Olsen # Date 1248628357 -7200 # Node ID c704fea92f80ed4e1b22c79bff57a71886cf6e71 # Parent 327eef051d5036ce2c93630f797e372146677a6a Fixed potential crash with complex recursive struct types. diff -r 327eef051d50 -r c704fea92f80 gen/llvmhelpers.cpp --- a/gen/llvmhelpers.cpp Sun Jul 26 18:32:25 2009 +0200 +++ b/gen/llvmhelpers.cpp Sun Jul 26 19:12:37 2009 +0200 @@ -1458,8 +1458,9 @@ // we cannot get the llvm alignment if the type is still opaque, this can happen in some // forward reference situations, so when this happens we fall back to manual padding. + // also handle arbitrary "by-value" opaques nested inside aggregates. const llvm::Type* T = DtoType(type); - if (llvm::isa(T)) + if (!T->isSized()) { return offset; }