Get the size of object to pass to objc_memmove_collectable()

from correct field of TypeInfo.

llvm-svn: 81446
This commit is contained in:
Fariborz Jahanian 2009-09-10 16:20:31 +00:00
parent bc56152196
commit d1f1ff3978
1 changed files with 2 additions and 2 deletions

View File

@ -2784,7 +2784,7 @@ void CGObjCMac::EmitGCMemmoveCollectable(CodeGen::CodeGenFunction &CGF,
QualType Ty) {
// Get size info for this aggregate.
std::pair<uint64_t, unsigned> TypeInfo = CGM.getContext().getTypeInfo(Ty);
unsigned long size = TypeInfo.second/8;
unsigned long size = TypeInfo.first/8;
SrcPtr = CGF.Builder.CreateBitCast(SrcPtr, ObjCTypes.Int8PtrTy);
DestPtr = CGF.Builder.CreateBitCast(DestPtr, ObjCTypes.Int8PtrTy);
llvm::Value *N = llvm::ConstantInt::get(ObjCTypes.LongTy, size);
@ -5311,7 +5311,7 @@ void CGObjCNonFragileABIMac::EmitGCMemmoveCollectable(
QualType Ty) {
// Get size info for this aggregate.
std::pair<uint64_t, unsigned> TypeInfo = CGM.getContext().getTypeInfo(Ty);
unsigned long size = TypeInfo.second/8;
unsigned long size = TypeInfo.first/8;
SrcPtr = CGF.Builder.CreateBitCast(SrcPtr, ObjCTypes.Int8PtrTy);
DestPtr = CGF.Builder.CreateBitCast(DestPtr, ObjCTypes.Int8PtrTy);
llvm::Value *N = llvm::ConstantInt::get(ObjCTypes.LongTy, size);