view ir/irvar.cpp @ 650:aa6a0b7968f7

Added test case for bug #100 Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 05 Oct 2008 17:28:15 +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;
}

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