comparison gen/classes.cpp @ 163:a8cd9bc1021a trunk

[svn r179] lots and lots of fixes, much more of tango now compiles/works.
author lindquist
date Mon, 05 May 2008 07:36:29 +0200
parents b77664331d06
children 2df270e1ba59
comparison
equal deleted inserted replaced
162:1856c62af24b 163:a8cd9bc1021a
1092 LOG_SCOPE; 1092 LOG_SCOPE;
1093 1093
1094 if (idxs.empty()) 1094 if (idxs.empty())
1095 idxs.push_back(0); 1095 idxs.push_back(0);
1096 1096
1097 const llvm::Type* llt = getPtrToType(DtoType(t));
1098 const llvm::Type* st = DtoType(cd->type); 1097 const llvm::Type* st = DtoType(cd->type);
1099 if (ptr->getType() != st) { 1098 if (ptr->getType() != st) {
1100 assert(gIR->irDsymbol[cd].irStruct->hasUnions); 1099 //assert(gIR->irDsymbol[cd].irStruct->hasUnions);
1101 ptr = gIR->ir->CreateBitCast(ptr, st, "tmp"); 1100 ptr = gIR->ir->CreateBitCast(ptr, st, "tmp");
1102 } 1101 }
1103 1102
1103 const llvm::Type* llt = getPtrToType(DtoType(t));
1104 unsigned dataoffset = 2; 1104 unsigned dataoffset = 2;
1105 1105
1106 IrStruct* irstruct = gIR->irDsymbol[cd].irStruct; 1106 IrStruct* irstruct = gIR->irDsymbol[cd].irStruct;
1107 for (IrStruct::OffsetMap::iterator i=irstruct->offsets.begin(); i!=irstruct->offsets.end(); ++i) { 1107 for (IrStruct::OffsetMap::iterator i=irstruct->offsets.begin(); i!=irstruct->offsets.end(); ++i) {
1108 //for (unsigned i=0; i<cd->fields.dim; ++i) { 1108 //for (unsigned i=0; i<cd->fields.dim; ++i) {