[svn r115] Implemented the ClassInfo.defaultConstructor member.

This commit is contained in:
Tomas Lindquist Olsen
2007-11-22 21:17:54 +01:00
parent be1fcd6a24
commit ccaf229830
3 changed files with 28 additions and 3 deletions

View File

@@ -632,13 +632,19 @@ L2:
inits.push_back(c);
// offset typeinfo
// TODO
c = build_offti_array(cd, cinfo->llvmInitZ->getOperand(10));
inits.push_back(c);
// default constructor
// TODO
c = cinfo->llvmInitZ->getOperand(11);
if (cd->defaultCtor) {
DtoForceDeclareDsymbol(cd->defaultCtor);
c = isaConstant(cd->defaultCtor->llvmValue);
//const llvm::Type* toTy = cinfo->llvmInitZ->getOperand(11)->getType();
c = llvm::ConstantExpr::getBitCast(c, llvm::PointerType::get(llvm::Type::Int8Ty)); // toTy);
}
else {
c = cinfo->llvmInitZ->getOperand(11);
}
inits.push_back(c);
/*size_t n = inits.size();