annotate ir/irtype.cpp @ 883:b52d5de7783f

GC defines and linkage changes.
author Christian Kamm <kamm incasoftware de>
date Thu, 08 Jan 2009 18:20:02 +0100
parents 340acf1535d0
children
rev   line source
ChristianK@173 1 #include "gen/llvm.h"
ChristianK@173 2 #include "ir/ir.h"
ChristianK@173 3 #include "ir/irtype.h"
ChristianK@173 4
ChristianK@173 5 std::set<IrType*> IrType::list;
ChristianK@173 6
ChristianK@173 7 void IrType::resetAll()
ChristianK@173 8 {
ChristianK@173 9 std::set<IrType*>::iterator it;
ChristianK@173 10 for(it = list.begin(); it != list.end(); ++it)
ChristianK@173 11 (*it)->reset();
ChristianK@173 12 }
ChristianK@173 13
ChristianK@173 14 IrType::IrType()
ChristianK@173 15 {
lindquist@174 16 assert(list.insert(this).second);
ChristianK@173 17 reset();
ChristianK@173 18 }
ChristianK@173 19
ChristianK@173 20 IrType::IrType(const IrType& s)
ChristianK@173 21 {
lindquist@174 22 assert(list.insert(this).second);
ChristianK@173 23 type = s.type;
ChristianK@173 24 }
ChristianK@173 25
ChristianK@173 26 IrType::~IrType()
ChristianK@173 27 {
ChristianK@173 28 list.erase(this);
ChristianK@173 29 }
ChristianK@173 30
ChristianK@173 31 void IrType::reset()
ChristianK@173 32 {
ChristianK@173 33 type = NULL;
ChristianK@173 34 }