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:
Christian Kamm
2008-07-23 17:56:09 +02:00
parent b1e8162b7b
commit 44931493f6
2 changed files with 4 additions and 3 deletions

View File

@@ -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;
}