Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fnext-runtime --emit-llvm -o %t %s |
Daniel Dunbar | b21d6af | 2008-09-04 04:36:23 +0000 | [diff] [blame] | 2 | |
3 | typedef struct { | ||||
4 | int x; | ||||
5 | int y; | ||||
6 | int z[10]; | ||||
7 | } MyPoint; | ||||
8 | |||||
9 | void f0(id a) { | ||||
10 | int i; | ||||
11 | MyPoint pt = { 1, 2}; | ||||
12 | |||||
13 | [a print0]; | ||||
14 | [a print1: 10]; | ||||
15 | [a print2: 10 and: "hello" and: 2.2]; | ||||
16 | [a takeStruct: pt ]; | ||||
17 | |||||
18 | void *s = @selector(print0); | ||||
19 | for (i=0; i<2; ++i) | ||||
20 | [a performSelector:s]; | ||||
21 | } |