Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 1457:ed70675862c8
Remove some unnecessary `#if`s. The D1 frontend has a Type::nextOf() which just
returns `next`.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 02 Jun 2009 18:41:10 +0200 |
parents | 638d16625da2 |
children | a5526b7a5ae6 |
comparison
equal
deleted
inserted
replaced
1456:7b218ec1044f | 1457:ed70675862c8 |
---|---|
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); | 1425 assert(t->nextOf()->size() % t->nextOf()->alignsize() == 0); |
1427 return hasUnalignedFields(t->nextOf()); | 1426 return hasUnalignedFields(t->nextOf()); |
1428 #else | |
1429 assert(t->next->size() % t->next->alignsize() == 0); | |
1430 return hasUnalignedFields(t->next); | |
1431 #endif | |
1432 } else if (t->ty != Tstruct) | 1427 } else if (t->ty != Tstruct) |
1433 return false; | 1428 return false; |
1434 | 1429 |
1435 TypeStruct* ts = (TypeStruct*)t; | 1430 TypeStruct* ts = (TypeStruct*)t; |
1436 if (ts->unaligned) | 1431 if (ts->unaligned) |