Mercurial > projects > ldc
comparison ir/irdtype.cpp @ 1184:a6dbd571d417
Moved ir/irtype.* into ir/irdtype.*.
Renamed IrType to IrDType, analogous to IrDSymbol.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Tue, 31 Mar 2009 20:21:28 +0200 |
parents | ir/irtype.cpp@340acf1535d0 |
children | 2a92c115461d |
comparison
equal
deleted
inserted
replaced
1183:df386fd4030e | 1184:a6dbd571d417 |
---|---|
1 #include "gen/llvm.h" | |
2 #include "ir/ir.h" | |
3 #include "ir/irdtype.h" | |
4 | |
5 std::set<IrDType*> IrDType::list; | |
6 | |
7 void IrDType::resetAll() | |
8 { | |
9 std::set<IrDType*>::iterator it; | |
10 for(it = list.begin(); it != list.end(); ++it) | |
11 (*it)->reset(); | |
12 } | |
13 | |
14 IrDType::IrDType() | |
15 { | |
16 assert(list.insert(this).second); | |
17 reset(); | |
18 } | |
19 | |
20 IrDType::IrDType(const IrDType& s) | |
21 { | |
22 assert(list.insert(this).second); | |
23 type = s.type; | |
24 } | |
25 | |
26 IrDType::~IrDType() | |
27 { | |
28 list.erase(this); | |
29 } | |
30 | |
31 void IrDType::reset() | |
32 { | |
33 type = NULL; | |
34 } |