comparison gen/llvmhelpers.cpp @ 812:6c2ff06c4201

Fixed a nasty bug with how interface vtables for class initializers were output, causing some class fields to be skipped. Fixed a problem in definition of ClassInfos where an invalid constant was potentially used. This needs to be looked into proper as it might happen again in the future.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 01 Dec 2008 04:37:54 +0100
parents c62c6936635b
children d128381e086e
comparison
equal deleted inserted replaced
811:8e6135be6999 812:6c2ff06c4201
1003 llvm::GlobalVariable* gvar = llvm::cast<llvm::GlobalVariable>(glob->value); 1003 llvm::GlobalVariable* gvar = llvm::cast<llvm::GlobalVariable>(glob->value);
1004 1004
1005 // refine the global's opaque type to the type of the initializer 1005 // refine the global's opaque type to the type of the initializer
1006 llvm::cast<LLOpaqueType>(glob->type.get())->refineAbstractTypeTo(initVal->getType()); 1006 llvm::cast<LLOpaqueType>(glob->type.get())->refineAbstractTypeTo(initVal->getType());
1007 1007
1008 assert(!glob->constInit);
1008 glob->constInit = initVal; 1009 glob->constInit = initVal;
1009 1010
1010 bool istempl = false; 1011 bool istempl = false;
1011 if ((vd->storage_class & STCcomdat) || (vd->parent && DtoIsTemplateInstance(vd->parent))) { 1012 if ((vd->storage_class & STCcomdat) || (vd->parent && DtoIsTemplateInstance(vd->parent))) {
1012 istempl = true; 1013 istempl = true;