!ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well.

This commit is contained in:
Tomas Lindquist Olsen
2009-04-17 00:54:20 +02:00
parent 9568616e66
commit c7936c2ace
2 changed files with 3 additions and 2 deletions

View File

@@ -146,7 +146,7 @@ llvm::Module* Module::genLLVMModule(Ir* sir)
sir->emitFunctionBodies();
// generate ModuleInfo
//genmoduleinfo();
genmoduleinfo();
// emit usedArray
if (!ir.usedArray.empty())

View File

@@ -66,8 +66,9 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol()
IrTypeClass* tc = cinfo->type->irtype->isClass();
assert(tc && "invalid ClassInfo type");
// classinfos cannot be constants since they're used a locks for synchronized
classInfo = new llvm::GlobalVariable(
tc->getPA().get(), true, _linkage, NULL, initname, gIR->module);
tc->getPA().get(), false, _linkage, NULL, initname, gIR->module);
return classInfo;
}