[cfe-commits] r128104 - in /cfe/trunk/lib/CodeGen: CGObjC.cpp CGObjCMac.cpp

David Chisnall csdavec at swan.ac.uk
Tue Mar 22 13:03:13 PDT 2011


Author: theraven
Date: Tue Mar 22 15:03:13 2011
New Revision: 128104

URL: http://llvm.org/viewvc/llvm-project?rev=128104&view=rev
Log:
Make the property accessor functions that take a ptrdiff_t actually take a ptrdiff_t instead of a long (should have no impact on any sane platforms, but win64 is not sane).


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

Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=128104&r1=128103&r2=128104&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Tue Mar 22 15:03:13 2011
@@ -236,7 +236,8 @@
     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 @@
     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));

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=128104&r1=128103&r2=128104&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Tue Mar 22 15:03:13 2011
@@ -328,7 +328,7 @@
     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 @@
     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);





More information about the cfe-commits mailing list