comparison gen/llvmhelpers.cpp @ 657:c42173b3557b

Removed some checks for abstract llvm types that were too strict, a 'opaque* null' is a valid initializer... when structs in D can be just a forward reference.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 06 Oct 2008 14:37:00 +0200
parents 8d850fa25713
children 4f004553de33
comparison
equal deleted inserted replaced
656:a15ccbf7451d 657:c42173b3557b
958 958
959 if (_init && _init->getType() != _type) 959 if (_init && _init->getType() != _type)
960 _type = _init->getType(); 960 _type = _init->getType();
961 llvm::cast<LLOpaqueType>(vd->ir.irGlobal->type.get())->refineAbstractTypeTo(_type); 961 llvm::cast<LLOpaqueType>(vd->ir.irGlobal->type.get())->refineAbstractTypeTo(_type);
962 _type = vd->ir.irGlobal->type.get(); 962 _type = vd->ir.irGlobal->type.get();
963 //_type->dump();
964 assert(!_type->isAbstract());
965 963
966 llvm::GlobalVariable* gvar = llvm::cast<llvm::GlobalVariable>(vd->ir.irGlobal->value); 964 llvm::GlobalVariable* gvar = llvm::cast<llvm::GlobalVariable>(vd->ir.irGlobal->value);
967 if (!(vd->storage_class & STCextern) && (vd->getModule() == gIR->dmodule || istempl)) 965 if (!(vd->storage_class & STCextern) && (vd->getModule() == gIR->dmodule || istempl))
968 { 966 {
969 if (Logger::enabled()) 967 if (Logger::enabled())