mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-03 11:03:14 +01:00
[svn r189] moving IR data back into DMD frontend nodes
This commit is contained in:
36
ir/irtype.cpp
Normal file
36
ir/irtype.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user