Deleted Added
full compact
169,174c169,174
< if (E->getType()->isUnionType()) {
< RecordDecl *SD = E->getType()->getAsRecordType()->getDecl();
< LValue FieldLoc = CGF.EmitLValueForField(DestPtr,
< *SD->field_begin(CGF.getContext()),
< true, 0);
< EmitInitializationToLValue(E->getSubExpr(), FieldLoc);
---
> if (E->getSubExpr()->getType()->isScalarType()) {
> QualType PtrTy =
> CGF.getContext().getPointerType(E->getSubExpr()->getType());
> llvm::Value *CastPtr = Builder.CreateBitCast(DestPtr,
> CGF.ConvertType(PtrTy));
> EmitInitializationToLValue(E->getSubExpr(), LValue::MakeAddr(CastPtr, 0));