comparison gen/classes.cpp @ 111:a7ae554ce4f4 trunk

[svn r115] Implemented the ClassInfo.defaultConstructor member.
author lindquist
date Thu, 22 Nov 2007 21:17:54 +0100
parents e8da7856a260
children 368547b1cbe6
comparison
equal deleted inserted replaced
110:e8da7856a260 111:a7ae554ce4f4
630 // TODO 630 // TODO
631 c = cinfo->llvmInitZ->getOperand(9); 631 c = cinfo->llvmInitZ->getOperand(9);
632 inits.push_back(c); 632 inits.push_back(c);
633 633
634 // offset typeinfo 634 // offset typeinfo
635 // TODO
636 c = build_offti_array(cd, cinfo->llvmInitZ->getOperand(10)); 635 c = build_offti_array(cd, cinfo->llvmInitZ->getOperand(10));
637 inits.push_back(c); 636 inits.push_back(c);
638 637
639 // default constructor 638 // default constructor
640 // TODO 639 if (cd->defaultCtor) {
641 c = cinfo->llvmInitZ->getOperand(11); 640 DtoForceDeclareDsymbol(cd->defaultCtor);
641 c = isaConstant(cd->defaultCtor->llvmValue);
642 //const llvm::Type* toTy = cinfo->llvmInitZ->getOperand(11)->getType();
643 c = llvm::ConstantExpr::getBitCast(c, llvm::PointerType::get(llvm::Type::Int8Ty)); // toTy);
644 }
645 else {
646 c = cinfo->llvmInitZ->getOperand(11);
647 }
642 inits.push_back(c); 648 inits.push_back(c);
643 649
644 /*size_t n = inits.size(); 650 /*size_t n = inits.size();
645 for (size_t i=0; i<n; ++i) 651 for (size_t i=0; i<n; ++i)
646 { 652 {