diff options
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 164df93e314..ca67c4bd1c1 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -88,8 +88,7 @@ CodeGenFunction::EmitObjCBoxedExpr(const ObjCBoxedExpr *E) { } llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E, - const ObjCMethodDecl *MethodWithObjects, - const ObjCMethodDecl *AllocMethod) { + const ObjCMethodDecl *MethodWithObjects) { ASTContext &Context = CGM.getContext(); const ObjCDictionaryLiteral *DLE = nullptr; const ObjCArrayLiteral *ALE = dyn_cast<ObjCArrayLiteral>(E); @@ -185,15 +184,6 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E, = InterfacePointerType->getObjectType()->getInterface(); CGObjCRuntime &Runtime = CGM.getObjCRuntime(); llvm::Value *Receiver = Runtime.GetClass(*this, Class); - if (AllocMethod) { - // Generate the "alloc" message send. - CallArgList Args; - Selector AllocMethodSel = AllocMethod->getSelector(); - RValue result = Runtime.GenerateMessageSend( - *this, ReturnValueSlot(), AllocMethod->getReturnType(), AllocMethodSel, - Receiver, Args, Class, AllocMethod); - Receiver = result.getScalarVal(); - } // Generate the message send. RValue result = Runtime.GenerateMessageSend( @@ -213,14 +203,12 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E, } llvm::Value *CodeGenFunction::EmitObjCArrayLiteral(const ObjCArrayLiteral *E) { - return EmitObjCCollectionLiteral(E, E->getArrayWithObjectsMethod(), - E->getArrayAllocMethod()); + return EmitObjCCollectionLiteral(E, E->getArrayWithObjectsMethod()); } llvm::Value *CodeGenFunction::EmitObjCDictionaryLiteral( const ObjCDictionaryLiteral *E) { - return EmitObjCCollectionLiteral(E, E->getDictWithObjectsMethod(), - E->getDictAllocMethod()); + return EmitObjCCollectionLiteral(E, E->getDictWithObjectsMethod()); } /// Emit a selector. |