John McCall | 9b0a7ce | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -E %s -fobjc-arc "-triple" "x86_64-apple-macosx10.7.0" -fobjc-runtime-has-weak | FileCheck --check-prefix=CHECK-ARC %s |
| 2 | // RUN: %clang_cc1 -E %s -fobjc-arc "-triple" "x86_64-apple-macosx10.6.0" | FileCheck --check-prefix=CHECK-ARCLITE %s |
John McCall | 31168b0 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 3 | |
| 4 | #if __has_feature(objc_arc) |
| 5 | void has_objc_arc_feature(); |
| 6 | #else |
| 7 | void no_objc_arc_feature(); |
| 8 | #endif |
| 9 | |
| 10 | #if __has_feature(objc_arc_weak) |
| 11 | void has_objc_arc_weak_feature(); |
| 12 | #else |
| 13 | void no_objc_arc_weak_feature(); |
| 14 | #endif |
| 15 | |
Akira Hatanaka | 7275da0 | 2018-02-28 07:15:55 +0000 | [diff] [blame] | 16 | #if __has_feature(objc_arc_fields) |
| 17 | void has_objc_arc_fields(); |
| 18 | #else |
| 19 | void no_objc_arc_fields(); |
| 20 | #endif |
| 21 | |
John McCall | 31168b0 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 22 | // CHECK-ARC: void has_objc_arc_feature(); |
| 23 | // CHECK-ARC: void has_objc_arc_weak_feature(); |
Akira Hatanaka | 7275da0 | 2018-02-28 07:15:55 +0000 | [diff] [blame] | 24 | // CHECK-ARC: void has_objc_arc_fields(); |
John McCall | 31168b0 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 25 | |
| 26 | // CHECK-ARCLITE: void has_objc_arc_feature(); |
| 27 | // CHECK-ARCLITE: void no_objc_arc_weak_feature(); |
Akira Hatanaka | 7275da0 | 2018-02-28 07:15:55 +0000 | [diff] [blame] | 28 | // CHECK-ARCLITE: void has_objc_arc_fields(); |