mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-19 14:23:13 +01:00
!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:
@@ -146,7 +146,7 @@ llvm::Module* Module::genLLVMModule(Ir* sir)
|
||||
sir->emitFunctionBodies();
|
||||
|
||||
// generate ModuleInfo
|
||||
//genmoduleinfo();
|
||||
genmoduleinfo();
|
||||
|
||||
// emit usedArray
|
||||
if (!ir.usedArray.empty())
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user