StmtPrinter: factor out arg printing code to PrintCallArgs
[clang.git] / test / CodeGenObjC / messages.m
blob5f77a8e327eb1516c570c4217f87397a17b93abe
1 // RUN: %clang_cc1 -emit-llvm -o %t %s
2 // RUN: grep "objc_msgSend" %t | count 6
3 // RUN: %clang_cc1 -fgnu-runtime -emit-llvm -o %t %s
4 // RUN: grep "objc_msg_lookup" %t | count 6
5 // RUN: %clang_cc1 -fgnu-runtime -fobjc-nonfragile-abi -emit-llvm -o %t %s
6 // RUN: grep "objc_msg_lookup_sender" %t | count 6
8 typedef struct {
9   int x;
10   int y;
11   int z[10];
12 } MyPoint;
14 void f0(id a) {
15   int i;
16   MyPoint pt = { 1, 2};
18   [a print0];
19   [a print1: 10];
20   [a print2: 10 and: "hello" and: 2.2];
21   [a takeStruct: pt ];
22   
23   void *s = @selector(print0);
24   for (i=0; i<2; ++i)
25     [a performSelector:s];