view ir/ir.cpp @ 1612:081c48283153

Merge DMD r278: bugzilla 370 Compiler stack overflow on recursive... bugzilla 370 Compiler stack overflow on recursive typeof in function declaration. --- dmd/expression.c | 1 + dmd/mtype.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:21 -0300
parents 2a687353c84d
children
line wrap: on
line source

#include "llvm/Target/TargetData.h"

#include "gen/irstate.h"
#include "gen/tollvm.h"
#include "gen/functions.h"

#include "ir/ir.h"
#include "ir/irfunction.h"


unsigned GetTypeAlignment(Ir* ir, Type* t)
{
    return gTargetData->getABITypeAlignment(DtoType(t));
}

Ir::Ir()
: irs(NULL)
{
}

void Ir::addFunctionBody(IrFunction * f)
{
    functionbodies.push_back(f);
}

void Ir::emitFunctionBodies()
{
    while (!functionbodies.empty())
    {
        IrFunction* irf = functionbodies.front();
        functionbodies.pop_front();
        DtoDefineFunction(irf->decl);
    }
}