1 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s \
2 // RUN: -fobjc-dispatch-method=legacy | \
3 // RUN: FileCheck -check-prefix CHECK-FRAGILE_LEGACY %s
5 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s \
6 // RUN: -fobjc-dispatch-method=legacy | \
7 // RUN: FileCheck -check-prefix CHECK-NONFRAGILE_LEGACY %s
9 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s \
10 // RUN: -fobjc-dispatch-method=non-legacy | \
11 // RUN: FileCheck -check-prefix CHECK-NONFRAGILE_NONLEGACY %s
13 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -o - %s \
14 // RUN: -fobjc-dispatch-method=mixed | \
15 // RUN: FileCheck -check-prefix CHECK-NONFRAGILE_MIXED %s
17 // There are basically four ways that we end up doing message dispatch for the
18 // NeXT runtime. They are:
19 // (1) fragile ABI, legacy dispatch
20 // (2) non-fragile ABI, legacy dispatch
21 // (2) non-fragile ABI, non-legacy dispatch
22 // (2) non-fragile ABI, mixed dispatch
24 // Note that fragile ABI and non-fragile ABI legacy dispatch are not the same,
25 // they use some different API calls (objc_msgSendSuper vs objc_msgSendSuper2).
27 // CHECK-FRAGILE_LEGACY: ModuleID
28 // CHECK-FRAGILE_LEGACY-NOT: declare ptr @objc_msgSendSuper2_fixup(
29 // CHECK-FRAGILE_LEGACY-NOT: declare ptr @objc_msgSend_fixup(
30 // CHECK-FRAGILE_LEGACY: declare ptr @objc_msgSendSuper(
31 // CHECK-FRAGILE_LEGACY: declare ptr @objc_msgSend(
33 // CHECK-NONFRAGILE_LEGACY: ModuleID
34 // CHECK-NONFRAGILE_LEGACY-NOT: declare ptr @objc_msgSendSuper2_fixup(
35 // CHECK-NONFRAGILE_LEGACY-NOT: declare ptr @objc_msgSend_fixup(
36 // CHECK-NONFRAGILE_LEGACY: declare ptr @objc_msgSendSuper2(
37 // CHECK-NONFRAGILE_LEGACY: declare ptr @objc_msgSend(
39 // CHECK-NONFRAGILE_NONLEGACY: ModuleID
40 // CHECK-NONFRAGILE_NONLEGACY: declare ptr @objc_msgSendSuper2_fixup(
41 // CHECK-NONFRAGILE_NONLEGACY: declare ptr @objc_msgSend_fixup(
43 // CHECK-NONFRAGILE_MIXED: declare ptr @objc_msgSendSuper2_fixup(
44 // CHECK-NONFRAGILE_MIXED: declare ptr @objc_msgSendSuper2(
45 // CHECK-NONFRAGILE_MIXED: declare ptr @objc_msgSend_fixup(
46 // CHECK-NONFRAGILE_MIXED: declare ptr @objc_msgSend(
53 @interface I0 : NSObject