blob: a6b20000d8026191434894ae4ee37b45ad0b9245 [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// RUN: %clang_cc1 -fobjc-dispatch-method=mixed -triple i386-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_NEW_DISPATCH %s
Daniel Dunbar2feefe82010-02-01 21:07:33 +00002//
3// CHECK_NEW_DISPATCH: define void @f0
4// CHECK_NEW_DISPATCH: bitcast {{.*}}objc_msgSend_fixup_alloc
5// CHECK_NEW_DISPATCH: define void @f1
6// CHECK_NEW_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
7//
John McCalld1e40d52011-10-02 01:16:38 +00008// RUN: %clang_cc1 -fobjc-dispatch-method=legacy -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_OLD_DISPATCH %s
Daniel Dunbar2feefe82010-02-01 21:07:33 +00009//
10// CHECK_OLD_DISPATCH: define void @f0
11// CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
12// CHECK_OLD_DISPATCH: define void @f1
13// CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
14
15@interface A
16+(id) alloc;
17-(int) im0;
18@end
19
20void f0(void) {
21 [A alloc];
22}
23
24void f1(A *a) {
25 [a im0];
26}