changeset 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 7b218ec1044f
children 69a195e07d89
files gen/llvmhelpers.cpp ir/irclass.cpp ir/irtypeclass.cpp
diffstat 3 files changed, 0 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Tue Jun 02 17:12:37 2009 +0100
+++ b/gen/llvmhelpers.cpp	Tue Jun 02 18:41:10 2009 +0200
@@ -1422,13 +1422,8 @@
 {
     t = t->toBasetype();
     if (t->ty == Tsarray) {
-#if DMDV2
         assert(t->nextOf()->size() % t->nextOf()->alignsize() == 0);
         return hasUnalignedFields(t->nextOf());
-#else
-        assert(t->next->size() % t->next->alignsize() == 0);
-        return hasUnalignedFields(t->next);
-#endif
     } else if (t->ty != Tstruct)
         return false;
 
--- a/ir/irclass.cpp	Tue Jun 02 17:12:37 2009 +0100
+++ b/ir/irclass.cpp	Tue Jun 02 18:41:10 2009 +0200
@@ -111,11 +111,7 @@
                     "don't implement any interfaces");
 
     VarDeclarationIter idx(ClassDeclaration::classinfo->fields, 3);
-#if DMDV2
     const llvm::Type* InterfaceTy = DtoType(idx->type->nextOf());
-#else
-    const llvm::Type* InterfaceTy = DtoType(idx->type->next);
-#endif
 
     // create Interface[N]
     const llvm::ArrayType* array_type = llvm::ArrayType::get(InterfaceTy,n);
@@ -330,11 +326,7 @@
 
     // start with the interface info
     VarDeclarationIter interfaces_idx(ClassDeclaration::classinfo->fields, 3);
-#if DMDV2
     Type* first = interfaces_idx->type->nextOf()->pointerTo();
-#else
-    Type* first = interfaces_idx->type->next->pointerTo();
-#endif
 
     // index into the interfaces array
     llvm::Constant* idxs[2] = {
--- a/ir/irtypeclass.cpp	Tue Jun 02 17:12:37 2009 +0100
+++ b/ir/irtypeclass.cpp	Tue Jun 02 18:41:10 2009 +0200
@@ -171,11 +171,7 @@
         ArrayIter<BaseClass> it2(*base->vtblInterfaces);
 
         VarDeclarationIter interfaces_idx(ClassDeclaration::classinfo->fields, 3);
-#if DMDV2
 	Type* first = interfaces_idx->type->nextOf()->pointerTo();
-#else
-        Type* first = interfaces_idx->type->next->pointerTo();
-#endif
 
         // align offset
         offset = (offset + PTRSIZE - 1) & ~(PTRSIZE - 1);