[cfe-commits] r130956 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu May 5 15:00:38 PDT 2011
Author: fjahanian
Date: Thu May 5 17:00:38 2011
New Revision: 130956
URL: http://llvm.org/viewvc/llvm-project?rev=130956&view=rev
Log:
type of last arg of objc_assign_ivar is ptrdiff_t.
// rdar://9362887
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=130956&r1=130955&r2=130956&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu May 5 17:00:38 2011
@@ -324,7 +324,11 @@
// id objc_assign_ivar(id, id *, ptrdiff_t)
std::vector<const llvm::Type*> Args(1, ObjectPtrTy);
Args.push_back(ObjectPtrTy->getPointerTo());
- Args.push_back(LongTy);
+ const llvm::Type *PtrDiffTy =
+ CGM.getTypes().ConvertType(
+ CGM.getContext().getPointerDiffType()->getCanonicalTypeUnqualified());
+
+ Args.push_back(PtrDiffTy);
llvm::FunctionType *FTy =
llvm::FunctionType::get(ObjectPtrTy, Args, false);
return CGM.CreateRuntimeFunction(FTy, "objc_assign_ivar");
More information about the cfe-commits
mailing list