summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-12-18 17:13:56 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-12-18 17:13:56 +0000
commit661a97bedea667db01ea2c5e7b93b83f1e12d0c4 (patch)
treeeac35f3391513a014af7ca250dbee7e21cc7a511 /clang/lib/CodeGen/CGObjC.cpp
parent2f27d571c8a757b5a48dfb7b28e24f728f4e317b (diff)
downloadbcm5719-llvm-661a97bedea667db01ea2c5e7b93b83f1e12d0c4.tar.gz
bcm5719-llvm-661a97bedea667db01ea2c5e7b93b83f1e12d0c4.zip
[Objective-C]. Patch to unify code generation for ObjCMsgSend and ObjCBoxedExpr.
Patch by Alex Denisov. NFC. llvm-svn: 224525
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index a2bd61ee58f..81bd108c357 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -60,7 +60,6 @@ llvm::Value *CodeGenFunction::EmitObjCStringLiteral(const ObjCStringLiteral *E)
llvm::Value *
CodeGenFunction::EmitObjCBoxedExpr(const ObjCBoxedExpr *E) {
// Generate the correct selector for this literal's concrete type.
- const Expr *SubExpr = E->getSubExpr();
// Get the method.
const ObjCMethodDecl *BoxingMethod = E->getBoxingMethod();
assert(BoxingMethod && "BoxingMethod is null");
@@ -73,12 +72,9 @@ CodeGenFunction::EmitObjCBoxedExpr(const ObjCBoxedExpr *E) {
CGObjCRuntime &Runtime = CGM.getObjCRuntime();
const ObjCInterfaceDecl *ClassDecl = BoxingMethod->getClassInterface();
llvm::Value *Receiver = Runtime.GetClass(*this, ClassDecl);
-
- const ParmVarDecl *argDecl = *BoxingMethod->param_begin();
- QualType ArgQT = argDecl->getType().getUnqualifiedType();
- RValue RV = EmitAnyExpr(SubExpr);
+
CallArgList Args;
- Args.add(RV, ArgQT);
+ EmitCallArgs(Args, BoxingMethod, E->arg_begin(), E->arg_end());
RValue result = Runtime.GenerateMessageSend(
*this, ReturnValueSlot(), BoxingMethod->getReturnType(), Sel, Receiver,
OpenPOWER on IntegriCloud