diff --git a/gen/tollvm.cpp b/gen/tollvm.cpp index af022115..f78712d1 100644 --- a/gen/tollvm.cpp +++ b/gen/tollvm.cpp @@ -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; } diff --git a/gen/typinf.cpp b/gen/typinf.cpp index e74af3fe..e44a4d05 100644 --- a/gen/typinf.cpp +++ b/gen/typinf.cpp @@ -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; }