John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fobjc-dispatch-method=mixed -triple i386-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_NEW_DISPATCH %s |
Daniel Dunbar | 2feefe8 | 2010-02-01 21:07:33 +0000 | [diff] [blame] | 2 | // |
| 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 McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 8 | // RUN: %clang_cc1 -fobjc-dispatch-method=legacy -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_OLD_DISPATCH %s |
Daniel Dunbar | 2feefe8 | 2010-02-01 21:07:33 +0000 | [diff] [blame] | 9 | // |
| 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 | |
| 20 | void f0(void) { |
| 21 | [A alloc]; |
| 22 | } |
| 23 | |
| 24 | void f1(A *a) { |
| 25 | [a im0]; |
| 26 | } |