| 1 |
// Check miscellaneous Objective-C options. |
| 2 |
|
| 3 |
// RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fobjc-arc -fobjc-weak 2>&1 | FileCheck %s --check-prefix ARC-WEAK |
| 4 |
// RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fno-objc-weak -fobjc-weak -fobjc-arc 2>&1 | FileCheck %s --check-prefix ARC-WEAK |
| 5 |
// ARC-WEAK: -fobjc-arc |
| 6 |
// ARC-WEAK: -fobjc-weak |
| 7 |
|
| 8 |
// RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fobjc-arc -fno-objc-weak 2>&1 | FileCheck %s --check-prefix ARC-NO-WEAK |
| 9 |
// RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fobjc-weak -fno-objc-weak -fobjc-arc 2>&1 | FileCheck %s --check-prefix ARC-NO-WEAK |
| 10 |
// ARC-NO-WEAK: -fobjc-arc |
| 11 |
// ARC-NO-WEAK: -fno-objc-weak |
| 12 |
|
| 13 |
// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fobjc-arc -fobjc-weak 2>&1 | FileCheck %s --check-prefix ARC-WEAK-NOTSUPPORTED |
| 14 |
// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak -fobjc-arc 2>&1 | FileCheck %s --check-prefix ARC-WEAK-NOTSUPPORTED |
| 15 |
// ARC-WEAK-NOTSUPPORTED: error: -fobjc-weak is not supported on the current deployment target |
| 16 |
|
| 17 |
// RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK |
| 18 |
// RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fno-objc-weak -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK |
| 19 |
// MRC-WEAK: -fobjc-weak |
| 20 |
|
| 21 |
// RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fno-objc-weak 2>&1 | FileCheck %s --check-prefix MRC-NO-WEAK |
| 22 |
// RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fobjc-weak -fno-objc-weak 2>&1 | FileCheck %s --check-prefix MRC-NO-WEAK |
| 23 |
// MRC-NO-WEAK: -fno-objc-weak |
| 24 |
|
| 25 |
// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK-NOTSUPPORTED |
| 26 |
// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK-NOTSUPPORTED |
| 27 |
// MRC-WEAK-NOTSUPPORTED: error: -fobjc-weak is not supported on the current deployment target |