mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 03:43:13 +01:00
Fixed root cause for Invalid BitCasts. DtoCanLoad continues to return false
for aggregates even though llvm 2.4svn could load them.
This commit is contained in:
@@ -549,7 +549,8 @@ void DtoStore(LLValue* src, LLValue* dst)
|
||||
bool DtoCanLoad(LLValue* ptr)
|
||||
{
|
||||
if (isaPointer(ptr->getType())) {
|
||||
return ptr->getType()->getContainedType(0)->isFirstClassType();
|
||||
const LLType* data = ptr->getType()->getContainedType(0);
|
||||
return data->isFirstClassType() && !data->isAggregateType();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -128,8 +128,8 @@ Expression *Type::getTypeInfo(Scope *sc)
|
||||
}
|
||||
}
|
||||
e = new VarExp(0, t->vtinfo);
|
||||
e = e->addressOf(sc);
|
||||
e->type = t->vtinfo->type; // do this so we don't get redundant dereference
|
||||
//e = e->addressOf(sc);
|
||||
//e->type = t->vtinfo->type; // do this so we don't get redundant dereference
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user