blob: 5f77a8e327eb1516c570c4217f87397a17b93abe [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep "objc_msgSend" %t | count 6
Daniel Dunbara5728872009-12-15 20:14:24 +00003// RUN: %clang_cc1 -fgnu-runtime -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00004// RUN: grep "objc_msg_lookup" %t | count 6
Daniel Dunbara5728872009-12-15 20:14:24 +00005// RUN: %clang_cc1 -fgnu-runtime -fobjc-nonfragile-abi -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00006// 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}