mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-27 17:13:20 +01:00
Moved ir/irtype.* into ir/irdtype.*.
Renamed IrType to IrDType, analogous to IrDSymbol.
This commit is contained in:
34
ir/irdtype.cpp
Normal file
34
ir/irdtype.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "gen/llvm.h"
|
||||
#include "ir/ir.h"
|
||||
#include "ir/irdtype.h"
|
||||
|
||||
std::set<IrDType*> IrDType::list;
|
||||
|
||||
void IrDType::resetAll()
|
||||
{
|
||||
std::set<IrDType*>::iterator it;
|
||||
for(it = list.begin(); it != list.end(); ++it)
|
||||
(*it)->reset();
|
||||
}
|
||||
|
||||
IrDType::IrDType()
|
||||
{
|
||||
assert(list.insert(this).second);
|
||||
reset();
|
||||
}
|
||||
|
||||
IrDType::IrDType(const IrDType& s)
|
||||
{
|
||||
assert(list.insert(this).second);
|
||||
type = s.type;
|
||||
}
|
||||
|
||||
IrDType::~IrDType()
|
||||
{
|
||||
list.erase(this);
|
||||
}
|
||||
|
||||
void IrDType::reset()
|
||||
{
|
||||
type = NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user