[cfe-commits] r81446 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Fariborz Jahanian fjahanian at apple.com
Thu Sep 10 09:20:31 PDT 2009


Author: fjahanian
Date: Thu Sep 10 11:20:31 2009
New Revision: 81446

URL: http://llvm.org/viewvc/llvm-project?rev=81446&view=rev
Log:
Get the size of object to pass to objc_memmove_collectable()
from correct field of TypeInfo.


Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=81446&r1=81445&r2=81446&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu Sep 10 11:20:31 2009
@@ -2784,7 +2784,7 @@
                                          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 @@
   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);





More information about the cfe-commits mailing list