changeset 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 a15ccbf7451d
children 50383e476c7e
files gen/classes.cpp gen/llvmhelpers.cpp
diffstat 2 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gen/classes.cpp	Mon Oct 06 14:06:55 2008 +0200
+++ b/gen/classes.cpp	Mon Oct 06 14:37:00 2008 +0200
@@ -1407,7 +1407,6 @@
     }
     else {
         c = llvm::ConstantExpr::getBitCast(cd->ir.irStruct->init, byteptrty);
-        assert(!cd->ir.irStruct->constInit->getType()->isAbstract());
         size_t initsz = getABITypeSize(cd->ir.irStruct->constInit->getType());
         c = DtoConstSlice(DtoConstSize_t(initsz), c);
     }
--- a/gen/llvmhelpers.cpp	Mon Oct 06 14:06:55 2008 +0200
+++ b/gen/llvmhelpers.cpp	Mon Oct 06 14:37:00 2008 +0200
@@ -960,8 +960,6 @@
         _type = _init->getType();
     llvm::cast<LLOpaqueType>(vd->ir.irGlobal->type.get())->refineAbstractTypeTo(_type);
     _type = vd->ir.irGlobal->type.get();
-    //_type->dump();
-    assert(!_type->isAbstract());
 
     llvm::GlobalVariable* gvar = llvm::cast<llvm::GlobalVariable>(vd->ir.irGlobal->value);
     if (!(vd->storage_class & STCextern) && (vd->getModule() == gIR->dmodule || istempl))