changeset 1366:81121ac19f61

Fixed previous aggregate initZ alignment. Added missing IrType::isDelegate method.
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Sat, 16 May 2009 18:37:16 +0200
parents 65505c9d70f5
children 8026319762be
files ir/irstruct.cpp ir/irtype.h
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ir/irstruct.cpp	Sat May 16 18:25:01 2009 +0200
+++ b/ir/irstruct.cpp	Sat May 16 18:37:16 2009 +0200
@@ -61,7 +61,7 @@
         init_pa.get(), true, _linkage, NULL, initname, gIR->module);
 
     // set alignment
-    init->setAlignment(aggrdecl->alignsize);
+    init->setAlignment(type->alignsize());
 
     return init;
 }
--- a/ir/irtype.h	Sat May 16 18:25:01 2009 +0200
+++ b/ir/irtype.h	Sat May 16 18:37:16 2009 +0200
@@ -13,6 +13,7 @@
 class IrTypeArray;
 class IrTypeBasic;
 class IrTypeClass;
+class IrTypeDelegate;
 class IrTypeFunction;
 class IrTypePointer;
 class IrTypeSArray;
@@ -36,6 +37,8 @@
     ///
     virtual IrTypeClass* isClass()      { return NULL; }
     ///
+    virtual IrTypeDelegate* isDelegate(){ return NULL; }
+    ///
     virtual IrTypeFunction* isFunction(){ return NULL; }
     ///
     virtual IrTypePointer* isPointer()  { return NULL; }