mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fixed function literals in static initializers. Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE. Changed errors to go to stderr instead of stdout. Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
#include "gen/llvm.h"
|
|
#include "declaration.h"
|
|
#include "ir/irvar.h"
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
IrVar::IrVar(VarDeclaration* var)
|
|
{
|
|
V = var;
|
|
value = NULL;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
IrGlobal::IrGlobal(VarDeclaration* v): IrVar(v),
|
|
type(llvm::OpaqueType::get())
|
|
{
|
|
constInit = NULL;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
IrLocal::IrLocal(VarDeclaration* v) : IrVar(v)
|
|
{
|
|
nestedIndex = -1;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
IrField::IrField(VarDeclaration* v) : IrVar(v)
|
|
{
|
|
index = 0;
|
|
unionOffset = 0;
|
|
constInit = NULL;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////////
|