Mercurial > projects > ldc
comparison ir/irclass.cpp @ 1241:fc579f389f9a
!ClassInfo instances were not mutable, this is necessary for .classinfo based locking to work. !ModuleInfo generation was commented out as well.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 17 Apr 2009 00:54:20 +0200 |
parents | 57db55766118 |
children | 871ae029ff49 |
comparison
equal
deleted
inserted
replaced
1240:f295e51d2dd0 | 1241:fc579f389f9a |
---|---|
64 ClassDeclaration* cinfo = ClassDeclaration::classinfo; | 64 ClassDeclaration* cinfo = ClassDeclaration::classinfo; |
65 DtoType(cinfo->type); | 65 DtoType(cinfo->type); |
66 IrTypeClass* tc = cinfo->type->irtype->isClass(); | 66 IrTypeClass* tc = cinfo->type->irtype->isClass(); |
67 assert(tc && "invalid ClassInfo type"); | 67 assert(tc && "invalid ClassInfo type"); |
68 | 68 |
69 // classinfos cannot be constants since they're used a locks for synchronized | |
69 classInfo = new llvm::GlobalVariable( | 70 classInfo = new llvm::GlobalVariable( |
70 tc->getPA().get(), true, _linkage, NULL, initname, gIR->module); | 71 tc->getPA().get(), false, _linkage, NULL, initname, gIR->module); |
71 | 72 |
72 return classInfo; | 73 return classInfo; |
73 } | 74 } |
74 | 75 |
75 ////////////////////////////////////////////////////////////////////////////// | 76 ////////////////////////////////////////////////////////////////////////////// |