]> granicus.if.org Git - clang/commitdiff
Make the property accessor functions that take a ptrdiff_t actually take a ptrdiff_t...
authorDavid Chisnall <csdavec@swan.ac.uk>
Tue, 22 Mar 2011 20:03:13 +0000 (20:03 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Tue, 22 Mar 2011 20:03:13 +0000 (20:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128104 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjC.cpp
lib/CodeGen/CGObjCMac.cpp

index cf1ff23000d373e741b9ff4a04e4f9fc4dbf96c8..0118537fbf09cf3cde107971e8879e934fd1fd57 100644 (file)
@@ -236,7 +236,8 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP,
     CallArgList Args;
     Args.push_back(std::make_pair(RValue::get(SelfAsId), IdTy));
     Args.push_back(std::make_pair(RValue::get(CmdVal), Cmd->getType()));
-    Args.push_back(std::make_pair(RValue::get(Offset), getContext().LongTy));
+    Args.push_back(std::make_pair(RValue::get(Offset),
+                getContext().getPointerDiffType()));
     Args.push_back(std::make_pair(RValue::get(True), getContext().BoolTy));
     // FIXME: We shouldn't need to get the function info here, the
     // runtime already should have computed it to build the function.
@@ -394,7 +395,8 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP,
     CallArgList Args;
     Args.push_back(std::make_pair(RValue::get(SelfAsId), IdTy));
     Args.push_back(std::make_pair(RValue::get(CmdVal), Cmd->getType()));
-    Args.push_back(std::make_pair(RValue::get(Offset), getContext().LongTy));
+    Args.push_back(std::make_pair(RValue::get(Offset),
+                getContext().getPointerDiffType()));
     Args.push_back(std::make_pair(RValue::get(ArgAsId), IdTy));
     Args.push_back(std::make_pair(RValue::get(IsAtomic ? True : False),
                                   getContext().BoolTy));
index a33e0941cb50ef5e71ee67f9d70c90704b0975c5..1900a85bc3778e5c2f65d6f19eee7b1e9b4e4d6e 100644 (file)
@@ -328,7 +328,7 @@ public:
     CanQualType SelType = Ctx.getCanonicalParamType(Ctx.getObjCSelType());
     Params.push_back(IdType);
     Params.push_back(SelType);
-    Params.push_back(Ctx.LongTy);
+    Params.push_back(Ctx.getPointerDiffType()->getCanonicalTypeUnqualified());
     Params.push_back(Ctx.BoolTy);
     const llvm::FunctionType *FTy =
       Types.GetFunctionType(Types.getFunctionInfo(IdType, Params,
@@ -346,7 +346,7 @@ public:
     CanQualType SelType = Ctx.getCanonicalParamType(Ctx.getObjCSelType());
     Params.push_back(IdType);
     Params.push_back(SelType);
-    Params.push_back(Ctx.LongTy);
+    Params.push_back(Ctx.getPointerDiffType()->getCanonicalTypeUnqualified());
     Params.push_back(IdType);
     Params.push_back(Ctx.BoolTy);
     Params.push_back(Ctx.BoolTy);