comparison gen/classes.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 8aebdf56c455
children 92ec7487a1a0
comparison
equal deleted inserted replaced
656:a15ccbf7451d 657:c42173b3557b
1405 if (cd->isInterfaceDeclaration() || cd->isAbstract()) { 1405 if (cd->isInterfaceDeclaration() || cd->isAbstract()) {
1406 c = defc->getOperand(2); 1406 c = defc->getOperand(2);
1407 } 1407 }
1408 else { 1408 else {
1409 c = llvm::ConstantExpr::getBitCast(cd->ir.irStruct->init, byteptrty); 1409 c = llvm::ConstantExpr::getBitCast(cd->ir.irStruct->init, byteptrty);
1410 assert(!cd->ir.irStruct->constInit->getType()->isAbstract());
1411 size_t initsz = getABITypeSize(cd->ir.irStruct->constInit->getType()); 1410 size_t initsz = getABITypeSize(cd->ir.irStruct->constInit->getType());
1412 c = DtoConstSlice(DtoConstSize_t(initsz), c); 1411 c = DtoConstSlice(DtoConstSize_t(initsz), c);
1413 } 1412 }
1414 inits.push_back(c); 1413 inits.push_back(c);
1415 1414