Disabled resetting types between modules MAO (more at once). Fixes guaranteed MOA compilation segfault.

This commit is contained in:
Tomas Lindquist Olsen
2009-04-17 17:16:55 +02:00
parent 36f3161803
commit 134870c873
3 changed files with 1 additions and 38 deletions
+1 -2
View File
@@ -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);
-26
View File
@@ -2,33 +2,7 @@
#include "ir/ir.h"
#include "ir/irdtype.h"
std::set<IrDType*> IrDType::list;
void IrDType::resetAll()
{
std::set<IrDType*>::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;
}
-10
View File
@@ -9,17 +9,7 @@ namespace llvm {
struct IrDType
{
static std::set<IrDType*> 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;
};