aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-09-10 16:20:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-09-10 16:20:31 +0000
commit736d8a66062eeb25a4b63dcac36d1d4c261a02c4 (patch)
tree5130a4292a22fdd1a763268ca885f8eb139ed706
parent716a0042f8fcba0884d0a664ee1d87049ef0f84b (diff)
Get the size of object to pass to objc_memmove_collectable()
from correct field of TypeInfo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81446 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGObjCMac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index e685385426..9ed1c169b5 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -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);