comparison gen/classes.cpp @ 292:a92ec67eabe7 trunk

[svn r313] Fix class initializer size regression introduced in [305]. Fixes memory_management_05 and odd_bug_15_A.
author ChristianK
date Sun, 22 Jun 2008 13:23:28 +0200
parents 297690b5d4a5
children 895e1b50cf2a
comparison
equal deleted inserted replaced
291:068cb3c60afb 292:a92ec67eabe7
1480 if (cd->isInterfaceDeclaration() || cd->isAbstract()) { 1480 if (cd->isInterfaceDeclaration() || cd->isAbstract()) {
1481 c = defc->getOperand(2); 1481 c = defc->getOperand(2);
1482 } 1482 }
1483 else { 1483 else {
1484 c = llvm::ConstantExpr::getBitCast(cd->ir.irStruct->init, byteptrty); 1484 c = llvm::ConstantExpr::getBitCast(cd->ir.irStruct->init, byteptrty);
1485 assert(!defc->getType()->isAbstract()); 1485 assert(!cd->ir.irStruct->constInit->getType()->isAbstract());
1486 size_t initsz = getABITypeSize(defc->getType()); 1486 size_t initsz = getABITypeSize(cd->ir.irStruct->constInit->getType());
1487 c = DtoConstSlice(DtoConstSize_t(initsz), c); 1487 c = DtoConstSlice(DtoConstSize_t(initsz), c);
1488 } 1488 }
1489 inits.push_back(c); 1489 inits.push_back(c);
1490 1490
1491 // class name 1491 // class name