Different fixes: phobos compiles now

This commit is contained in:
Alexey Prokhin
2010-10-28 14:53:01 +04:00
parent b1e5993873
commit e4c3179d43
11 changed files with 116 additions and 39 deletions

View File

@@ -444,7 +444,12 @@ void DtoAssign(Loc& loc, DValue* lhs, DValue* rhs)
r = DtoCast(loc, rhs, lhs->getType())->getRVal();
if (Logger::enabled())
Logger::cout() << "really assign\nlhs: " << *l << "rhs: " << *r << '\n';
assert(r->getType() == l->getType()->getContainedType(0));
#if 1
if(r->getType() != lit) // It's wierd but it happens. TODO: try to remove this hack
r = DtoBitCast(r, lit);
#else
assert(r->getType() == lit);
#endif
}
gIR->ir->CreateStore(r, l);
}
@@ -1525,8 +1530,8 @@ size_t realignOffset(size_t offset, Type* type)
Type * stripModifiers( Type * type )
{
#if DMDV2
if (type->ty == Tfunction)
return type;
if (type->ty == Tfunction)
return type;
Type *t = type;
while (t->mod)
{