Files
ldc/ir/irtype.cpp
Tomas Lindquist Olsen e07b99bc26 [svn r190] Fixed array concatenation for some broken cases.
Added a sanity check for the Dsymbol state set.
2008-05-06 18:36:46 +02:00

37 lines
536 B
C++

#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()
{
assert(list.insert(this).second);
reset();
}
IrType::IrType(const IrType& s)
{
assert(list.insert(this).second);
type = s.type;
vtblType = s.type;
}
IrType::~IrType()
{
list.erase(this);
}
void IrType::reset()
{
type = NULL;
vtblType = NULL;
}