summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 8ca80808e00..a67e900a179 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -88,7 +88,8 @@ CodeGenFunction::EmitObjCBoxedExpr(const ObjCBoxedExpr *E) {
}
llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E,
- const ObjCMethodDecl *MethodWithObjects) {
+ const ObjCMethodDecl *MethodWithObjects,
+ const ObjCMethodDecl *AllocMethod) {
ASTContext &Context = CGM.getContext();
const ObjCDictionaryLiteral *DLE = nullptr;
const ObjCArrayLiteral *ALE = dyn_cast<ObjCArrayLiteral>(E);
@@ -203,12 +204,14 @@ llvm::Value *CodeGenFunction::EmitObjCCollectionLiteral(const Expr *E,
}
llvm::Value *CodeGenFunction::EmitObjCArrayLiteral(const ObjCArrayLiteral *E) {
- return EmitObjCCollectionLiteral(E, E->getArrayWithObjectsMethod());
+ return EmitObjCCollectionLiteral(E, E->getArrayWithObjectsMethod(),
+ E->getArrayAllocMethod());
}
llvm::Value *CodeGenFunction::EmitObjCDictionaryLiteral(
const ObjCDictionaryLiteral *E) {
- return EmitObjCCollectionLiteral(E, E->getDictWithObjectsMethod());
+ return EmitObjCCollectionLiteral(E, E->getDictWithObjectsMethod(),
+ E->getDictAllocMethod());
}
/// Emit a selector.
OpenPOWER on IntegriCloud