view ir/irtype.cpp @ 173:db9890b3fb64 trunk

[svn r189] moving IR data back into DMD frontend nodes
author ChristianK
date Tue, 06 May 2008 07:56:03 +0200
parents
children 16e676ae5ab4
line wrap: on
line source

#include "gen/llvm.h"
#include "ir/ir.h"
#include "ir/irtype.h"

std::set<IrType*> IrType::list;

void IrType::resetAll()
{
    std::set<IrType*>::iterator it;
    for(it = list.begin(); it != list.end(); ++it)
        (*it)->reset();
}

IrType::IrType()
{
    list.insert(this);
    reset();
}

IrType::IrType(const IrType& s)
{
    list.insert(this);
    type = s.type;
    vtblType = s.type;
}

IrType::~IrType()
{
    list.erase(this);
}

void IrType::reset()
{
    type = NULL;
    vtblType = NULL;
}