[svn r217] Updated: the rebuild profiles.

Fixed: way to find class data fields was too strict type wise.
Fixed: foreach resulting in an implicit delegate could fail.
This commit is contained in:
Tomas Lindquist Olsen
2008-05-12 22:44:25 +02:00
parent ee551c95b9
commit c571bf0f70
6 changed files with 22 additions and 12 deletions

View File

@@ -1006,11 +1006,16 @@ void DtoAssign(DValue* lhs, DValue* rhs)
Logger::cout() << "assign\nlhs: " << *l << "rhs: " << *r << '\n';
const llvm::Type* lit = l->getType()->getContainedType(0);
if (r->getType() != lit) {
if (DLRValue* lr = lhs->isLRValue()) // handle lvalue cast assignments
// handle lvalue cast assignments
if (DLRValue* lr = lhs->isLRValue()) {
Logger::println("lvalue cast!");
r = DtoCast(rhs, lr->getLType())->getRVal();
else
}
else {
r = DtoCast(rhs, lhs->getType())->getRVal();
}
Logger::cout() << "really assign\nlhs: " << *l << "rhs: " << *r << '\n';
assert(r->getType() == l->getType()->getContainedType(0));
}
gIR->ir->CreateStore(r, l);
}