summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-03-23 21:01:34 +0000
committerBill Wendling <isanbard@gmail.com>2011-03-23 21:01:34 +0000
commit629ecb9a204518d2b1ec2f207a14cfef9a94b002 (patch)
treeab8cec3519534221eea698db0e0d2f96839f649a
parent7980d5f85e8336d825fb42f4d01585e56117c524 (diff)
--- Merging r128104 into '.':
U lib/CodeGen/CGObjCMac.cpp U lib/CodeGen/CGObjC.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_29@128166 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGObjC.cpp6
-rw-r--r--lib/CodeGen/CGObjCMac.cpp4
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index e37b19f253..89c2a49a2a 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -238,7 +238,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.
@@ -396,7 +397,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/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index bc02ed5b43..a700295e66 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/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);