From 9beb33770ffd5a49c870d06b38129ddca0b0c16f Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Sat, 16 May 2009 18:37:16 +0200 Subject: [PATCH] Fixed previous aggregate initZ alignment. Added missing IrType::isDelegate method. --- ir/irstruct.cpp | 2 +- ir/irtype.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ir/irstruct.cpp b/ir/irstruct.cpp index 96be3e40..f0dfab86 100644 --- a/ir/irstruct.cpp +++ b/ir/irstruct.cpp @@ -61,7 +61,7 @@ LLGlobalVariable * IrStruct::getInitSymbol() init_pa.get(), true, _linkage, NULL, initname, gIR->module); // set alignment - init->setAlignment(aggrdecl->alignsize); + init->setAlignment(type->alignsize()); return init; } diff --git a/ir/irtype.h b/ir/irtype.h index 864ac68e..507c46e5 100644 --- a/ir/irtype.h +++ b/ir/irtype.h @@ -13,6 +13,7 @@ class IrTypeAggr; class IrTypeArray; class IrTypeBasic; class IrTypeClass; +class IrTypeDelegate; class IrTypeFunction; class IrTypePointer; class IrTypeSArray; @@ -36,6 +37,8 @@ public: /// virtual IrTypeClass* isClass() { return NULL; } /// + virtual IrTypeDelegate* isDelegate(){ return NULL; } + /// virtual IrTypeFunction* isFunction(){ return NULL; } /// virtual IrTypePointer* isPointer() { return NULL; }