Minor refactoring. No intended change in behavior.

llvm-svn: 69988
This commit is contained in:
Fariborz Jahanian 2009-04-24 21:07:43 +00:00
parent 3fa455a1aa
commit 969bc68195
1 changed files with 3 additions and 3 deletions

View File

@ -1389,10 +1389,8 @@ CodeGen::RValue CGObjCMac::GenerateMessageSend(CodeGen::CodeGenFunction &CGF,
llvm::Value *Receiver,
bool IsClassMessage,
const CallArgList &CallArgs) {
llvm::Value *Arg0 =
CGF.Builder.CreateBitCast(Receiver, ObjCTypes.ObjectPtrTy, "tmp");
return EmitMessageSend(CGF, ResultType, Sel,
Arg0, CGF.getContext().getObjCIdType(),
Receiver, CGF.getContext().getObjCIdType(),
false, CallArgs);
}
@ -1404,6 +1402,8 @@ CodeGen::RValue CGObjCMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF,
bool IsSuper,
const CallArgList &CallArgs) {
CallArgList ActualArgs;
if (!IsSuper)
Arg0 = CGF.Builder.CreateBitCast(Arg0, ObjCTypes.ObjectPtrTy, "tmp");
ActualArgs.push_back(std::make_pair(RValue::get(Arg0), Arg0Ty));
ActualArgs.push_back(std::make_pair(RValue::get(EmitSelector(CGF.Builder,
Sel)),