Files
ldc/ir/irstruct.cpp
Tomas Lindquist Olsen 905ca019dd Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration.
Added support for align(1)/packed structs, other alignments are still ignored.
Fixed some problems with accessing lazy arguments.
2008-07-30 10:12:55 +02:00

59 lines
1.1 KiB
C++

#include "gen/llvm.h"
#include "mtype.h"
#include "aggregate.h"
#include "ir/irstruct.h"
#include "gen/irstate.h"
IrInterface::IrInterface(BaseClass* b)
{
base = b;
decl = b->base;
vtblTy = NULL;
vtblInit = NULL;
vtbl = NULL;
infoTy = NULL;
infoInit = NULL;
info = NULL;
index = -1;
}
IrInterface::~IrInterface()
{
delete vtblTy;
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
IrStruct::IrStruct(Type* t)
: recty((t->ir.type) ? *t->ir.type : llvm::OpaqueType::get())
{
type = t;
defined = false;
constinited = false;
interfaceInfosTy = NULL;
interfaceInfos = NULL;
vtbl = NULL;
constVtbl = NULL;
init = NULL;
constInit = NULL;
classInfo = NULL;
constClassInfo = NULL;
hasUnions = false;
dunion = NULL;
classDeclared = false;
classDefined = false;
packed = false;
dwarfComposite = NULL;
}
IrStruct::~IrStruct()
{
}