diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-07 20:57:35 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-07 20:57:35 +0000 |
commit | d45e7cec42aeef87eef76996186597b9a5663de8 (patch) | |
tree | cf877eae5427e02dde0d918da21552ceefdbc47f /clang/lib/CodeGen/CGObjC.cpp | |
parent | 88d99e4f427350dc788a6a0a71c2f93be59a7cde (diff) | |
download | bcm5719-llvm-d45e7cec42aeef87eef76996186597b9a5663de8.tar.gz bcm5719-llvm-d45e7cec42aeef87eef76996186597b9a5663de8.zip |
Objective-C arc. Switch the Objective-C dictionary literal in ARC mode
to use non-retain/autorelease API variants of ObjC objects. wip.
rdar://17554063
llvm-svn: 215146
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( |