xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/objc2-legacy-dispatch.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-dispatch-method=mixed -triple i386-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_NEW_DISPATCH %s
2*f4a2713aSLionel Sambuc//
3*f4a2713aSLionel Sambuc// CHECK_NEW_DISPATCH-LABEL: define void @f0
4*f4a2713aSLionel Sambuc// CHECK_NEW_DISPATCH: bitcast {{.*}}objc_msgSend_fixup_alloc
5*f4a2713aSLionel Sambuc// CHECK_NEW_DISPATCH-LABEL: define void @f1
6*f4a2713aSLionel Sambuc// CHECK_NEW_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
7*f4a2713aSLionel Sambuc//
8*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-dispatch-method=legacy -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_OLD_DISPATCH %s
9*f4a2713aSLionel Sambuc//
10*f4a2713aSLionel Sambuc// CHECK_OLD_DISPATCH-LABEL: define void @f0
11*f4a2713aSLionel Sambuc// CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
12*f4a2713aSLionel Sambuc// CHECK_OLD_DISPATCH-LABEL: define void @f1
13*f4a2713aSLionel Sambuc// CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc@interface A
16*f4a2713aSLionel Sambuc+(id) alloc;
17*f4a2713aSLionel Sambuc-(int) im0;
18*f4a2713aSLionel Sambuc@end
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambucvoid f0(void) {
21*f4a2713aSLionel Sambuc  [A alloc];
22*f4a2713aSLionel Sambuc}
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambucvoid f1(A *a) {
25*f4a2713aSLionel Sambuc  [a im0];
26*f4a2713aSLionel Sambuc}
27