comparison 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
comparison
equal deleted inserted replaced
172:68a7dd38c03c 173:db9890b3fb64
1 #include "gen/llvm.h"
2 #include "ir/ir.h"
3 #include "ir/irtype.h"
4
5 std::set<IrType*> IrType::list;
6
7 void IrType::resetAll()
8 {
9 std::set<IrType*>::iterator it;
10 for(it = list.begin(); it != list.end(); ++it)
11 (*it)->reset();
12 }
13
14 IrType::IrType()
15 {
16 list.insert(this);
17 reset();
18 }
19
20 IrType::IrType(const IrType& s)
21 {
22 list.insert(this);
23 type = s.type;
24 vtblType = s.type;
25 }
26
27 IrType::~IrType()
28 {
29 list.erase(this);
30 }
31
32 void IrType::reset()
33 {
34 type = NULL;
35 vtblType = NULL;
36 }