mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-06 12:23:13 +01:00
Small code modifications to Ir-Classes.
Adds some constructors and moves the code to the header file. Uses some of the new constructors. A big problem with the source are the different strategies used for otherwise similar classes. E.g. a IrField registers itself with the VarDeclaration. Same is required for IrParameter, but in this case it is done by the caller.
This commit is contained in:
@@ -26,27 +26,21 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
IrAggr::IrAggr(AggregateDeclaration* aggr)
|
||||
: init_type(LLStructType::create(gIR->context(), std::string(aggr->toPrettyChars()) + "_init"))
|
||||
{
|
||||
aggrdecl = aggr;
|
||||
|
||||
type = aggr->type;
|
||||
|
||||
packed = (type->ty == Tstruct)
|
||||
? type->alignsize() == 1
|
||||
: false;
|
||||
|
||||
: aggrdecl(aggr),
|
||||
type(aggr->type),
|
||||
packed((type->ty == Tstruct) ? type->alignsize() == 1 : false),
|
||||
// above still need to be looked at
|
||||
|
||||
init = NULL;
|
||||
constInit = NULL;
|
||||
|
||||
vtbl = NULL;
|
||||
constVtbl = NULL;
|
||||
classInfo = NULL;
|
||||
constClassInfo = NULL;
|
||||
|
||||
classInterfacesArray = NULL;
|
||||
init(0),
|
||||
constInit(0),
|
||||
init_type(LLStructType::create(gIR->context(), std::string(aggr->toPrettyChars()) + "_init")),
|
||||
vtbl(0),
|
||||
constVtbl(0),
|
||||
classInfo(0),
|
||||
constClassInfo(0),
|
||||
interfaceVtblMap(),
|
||||
classInterfacesArray(0),
|
||||
interfacesWithVtbls()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user