diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 886573f5..1ae2b297 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -94,9 +94,8 @@ llvm::Module* Module::genLLVMModule(Ir* sir) gIR = &ir; ir.dmodule = this; - // reset all IR data stored in Dsymbols and Types + // reset all IR data stored in Dsymbols IrDsymbol::resetAll(); - IrDType::resetAll(); sir->setState(&ir); diff --git a/ir/irdtype.cpp b/ir/irdtype.cpp index 24293962..373915f1 100644 --- a/ir/irdtype.cpp +++ b/ir/irdtype.cpp @@ -2,33 +2,7 @@ #include "ir/ir.h" #include "ir/irdtype.h" -std::set IrDType::list; - -void IrDType::resetAll() -{ - std::set::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; } diff --git a/ir/irdtype.h b/ir/irdtype.h index a3b4f8b3..8751ebea 100644 --- a/ir/irdtype.h +++ b/ir/irdtype.h @@ -9,17 +9,7 @@ namespace llvm { struct IrDType { - static std::set list; - static void resetAll(); - - // overload all of these to make sure - // the static list is up to date IrDType(); - IrDType(const IrDType& s); - ~IrDType(); - - void reset(); - llvm::PATypeHolder* type; };