[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

@@ -842,12 +842,13 @@ void ForeachStatement::toIR(IRState* p)
llvm::Value* zerokey = llvm::ConstantInt::get(keytype,0,false);
// value
Logger::println("value = %s", value->toPrettyChars());
const llvm::Type* valtype = DtoType(value->type);
llvm::Value* valvar = NULL;
if (!value->isRef() && !value->isOut())
valvar = new llvm::AllocaInst(valtype, "foreachval", p->topallocapoint());
assert(!value->ir.irLocal);
value->ir.irLocal = new IrLocal(value);
if (!value->ir.irLocal)
value->ir.irLocal = new IrLocal(value);
// what to iterate
DValue* aggrval = aggr->toElem(p);