mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-11-29 20:33:50 +01:00
Fix hasUnalignedFields(): take static arrays into account too.
This commit is contained in:
+4
-1
@@ -1571,7 +1571,10 @@ bool needsTemplateLinkage(Dsymbol* s)
|
|||||||
bool hasUnalignedFields(Type* t)
|
bool hasUnalignedFields(Type* t)
|
||||||
{
|
{
|
||||||
t = t->toBasetype();
|
t = t->toBasetype();
|
||||||
if (t->ty != Tstruct)
|
if (t->ty == Tsarray) {
|
||||||
|
assert(t->next->size() % t->next->alignsize() == 0);
|
||||||
|
return hasUnalignedFields(t->next);
|
||||||
|
} else if (t->ty != Tstruct)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TypeStruct* ts = (TypeStruct*)t;
|
TypeStruct* ts = (TypeStruct*)t;
|
||||||
|
|||||||
Reference in New Issue
Block a user