summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2011-03-22 20:03:13 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2011-03-22 20:03:13 +0000
commit08a45257de8973af0550ca93055d1bd94b353528 (patch)
tree778696ece1a234e39cbe98e5f2788a800525b436
parent230268261bb2adb6ea7a0348e185ad7aa41c7b37 (diff)
downloadbcm5719-llvm-08a45257de8973af0550ca93055d1bd94b353528.tar.gz
bcm5719-llvm-08a45257de8973af0550ca93055d1bd94b353528.zip
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).
llvm-svn: 128104
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp6
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index cf1ff23000d..0118537fbf0 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -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));
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index a33e0941cb5..1900a85bc37 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -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);
OpenPOWER on IntegriCloud