Files
ldc/ir/irstruct.cpp
Tomas Lindquist Olsen 9f3be435b0 [svn r209] Fixed: exotic array to pointer casts were broken.
Changed: classes now have opaque vtables.
2008-05-12 18:44:11 +02:00

58 lines
1.2 KiB
C++

#include "gen/llvm.h"
#include "mtype.h"
#include "aggregate.h"
#include "ir/irstruct.h"
#include "gen/irstate.h"
#if OPAQUE_VTBLS
IrInterface::IrInterface(BaseClass* b, const llvm::ArrayType* vt)
#else
IrInterface::IrInterface(BaseClass* b, const llvm::StructType* vt)
#endif
{
base = b;
decl = b->base;
vtblTy = vt;
vtblInit = NULL;
vtbl = NULL;
infoTy = NULL;
infoInit = NULL;
info = NULL;
index = -1;
}
IrInterface::~IrInterface()
{
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
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;
}
IrStruct::~IrStruct()
{
}