view ir/irvar.cpp @ 700:716684a0d63f

Updated rebuild profile for .o output as default, compiler needs to be fixed still. Fixed segfault with ' ldc foo.o -offoo '.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 13 Oct 2008 18:19:43 +0200
parents ccd07d9f2ce9
children 340acf1535d0
line wrap: on
line source

#include "llvm/DerivedTypes.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 = -1;
    indexOffset = 0;
    constInit = NULL;
}

//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////