xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/runtime-fns.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -emit-llvm -o %t %s
2*f4a2713aSLionel Sambuc// RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
3*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -DWITHDEF -emit-llvm -o %t %s
4*f4a2713aSLionel Sambuc// RUN: grep -e "^de.*objc_msgSend[0-9]*(" %t | count 1
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambucid objc_msgSend(int x);
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc@interface A @end
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@implementation A
11*f4a2713aSLionel Sambuc-(void) f0 {
12*f4a2713aSLionel Sambuc  objc_msgSend(12);
13*f4a2713aSLionel Sambuc}
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc-(void) hello {
16*f4a2713aSLionel Sambuc}
17*f4a2713aSLionel Sambuc@end
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambucvoid f0(id x) {
20*f4a2713aSLionel Sambuc  [x hello];
21*f4a2713aSLionel Sambuc}
22*f4a2713aSLionel Sambuc
23*f4a2713aSLionel Sambuc#ifdef WITHDEF
24*f4a2713aSLionel Sambuc// This isn't a very good send function.
25*f4a2713aSLionel Sambucid objc_msgSend(int x) {
26*f4a2713aSLionel Sambuc  return 0;
27*f4a2713aSLionel Sambuc}
28*f4a2713aSLionel Sambuc
29*f4a2713aSLionel Sambuc// rdar://6800430
30*f4a2713aSLionel Sambucvoid objc_assign_weak(id value, id *location) {
31*f4a2713aSLionel Sambuc}
32*f4a2713aSLionel Sambuc
33*f4a2713aSLionel Sambuc#endif
34