Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 1452:638d16625da2
LDC 2 compiles again.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 30 May 2009 17:23:32 +0100 |
parents | 3f5ea912149d |
children | ed70675862c8 |
comparison
equal
deleted
inserted
replaced
1423:42bd767ec5a4 | 1452:638d16625da2 |
---|---|
1420 | 1420 |
1421 bool hasUnalignedFields(Type* t) | 1421 bool hasUnalignedFields(Type* t) |
1422 { | 1422 { |
1423 t = t->toBasetype(); | 1423 t = t->toBasetype(); |
1424 if (t->ty == Tsarray) { | 1424 if (t->ty == Tsarray) { |
1425 #if DMDV2 | |
1426 assert(t->nextOf()->size() % t->nextOf()->alignsize() == 0); | |
1427 return hasUnalignedFields(t->nextOf()); | |
1428 #else | |
1425 assert(t->next->size() % t->next->alignsize() == 0); | 1429 assert(t->next->size() % t->next->alignsize() == 0); |
1426 return hasUnalignedFields(t->next); | 1430 return hasUnalignedFields(t->next); |
1431 #endif | |
1427 } else if (t->ty != Tstruct) | 1432 } else if (t->ty != Tstruct) |
1428 return false; | 1433 return false; |
1429 | 1434 |
1430 TypeStruct* ts = (TypeStruct*)t; | 1435 TypeStruct* ts = (TypeStruct*)t; |
1431 if (ts->unaligned) | 1436 if (ts->unaligned) |