diff options
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index a67e900a179..fe30d373df1 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -185,6 +185,15 @@ 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( |