blob: ea8809ffcd18695653efa1353c01862b2f276ab9 [file] [log] [blame]
Daniel Dunbarc5a97ec2009-11-17 07:07:28 +00001// RUN: clang-cc --emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep "objc_msgSend" %t | count 6
3// RUN: clang-cc -fgnu-runtime --emit-llvm -o %t %s
4// RUN: grep "objc_msg_lookup" %t | count 6
5// RUN: clang-cc -fgnu-runtime -fobjc-nonfragile-abi --emit-llvm -o %t %s
6// RUN: grep "objc_msg_lookup_sender" %t | count 6
Daniel Dunbarb21d6af2008-09-04 04:36:23 +00007
8typedef struct {
9 int x;
10 int y;
11 int z[10];
12} MyPoint;
13
14void f0(id a) {
15 int i;
16 MyPoint pt = { 1, 2};
17
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];
26}