# HG changeset patch # User Tomas Lindquist Olsen # Date 1239981415 -7200 # Node ID 2a92c115461d7ca04ea51d2a734c683ed97f606d # Parent 6ef97d65ca605a4c35216f9ed0cea252e761e7b7 Disabled resetting types between modules MAO (more at once). Fixes guaranteed MOA compilation segfault. diff -r 6ef97d65ca60 -r 2a92c115461d gen/toobj.cpp --- a/gen/toobj.cpp Fri Apr 17 14:48:37 2009 +0200 +++ b/gen/toobj.cpp Fri Apr 17 17:16:55 2009 +0200 @@ -94,9 +94,8 @@ 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 -r 6ef97d65ca60 -r 2a92c115461d ir/irdtype.cpp --- a/ir/irdtype.cpp Fri Apr 17 14:48:37 2009 +0200 +++ b/ir/irdtype.cpp Fri Apr 17 17:16:55 2009 +0200 @@ -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 -r 6ef97d65ca60 -r 2a92c115461d ir/irdtype.h --- a/ir/irdtype.h Fri Apr 17 14:48:37 2009 +0200 +++ b/ir/irdtype.h Fri Apr 17 17:16:55 2009 +0200 @@ -9,17 +9,7 @@ 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; };