Mercurial > projects > ldc
view ir/irstruct.cpp @ 771:bfabbac8e705
Fixed 64bit problem with aaValues runtime calls (assumed 32bits)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 16 Nov 2008 20:42:45 +0100 |
parents | 041c1596d217 |
children | 340acf1535d0 |
line wrap: on
line source
#include "gen/llvm.h" #include "mtype.h" #include "aggregate.h" #include "declaration.h" #include "ir/irstruct.h" #include "gen/irstate.h" #include "gen/tollvm.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() { } void IrStruct::addField(VarDeclaration* v) { // might already have its irField, as classes derive each other without getting copies of the VarDeclaration if (!v->ir.irField) { assert(!v->ir.isSet()); v->ir.irField = new IrField(v); } const LLType* _type = DtoType(v->type); offsets.insert(std::make_pair(v->offset, IrStruct::Offset(v, _type))); }