diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-09-29 23:52:58 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-09-29 23:52:58 +0000 |
commit | f2f3ce54fc1235bec2d0d0b0ef3b53bdff6d9655 (patch) | |
tree | 9340748524d91f325a0718836c423eb1bb6174e8 /test | |
parent | cfaab00963234237b46b52996e9d72b20540e97f (diff) |
Add Clang support for iOS6.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGenObjC/optimized-setter-ios-device.m | 33 | ||||
-rw-r--r-- | test/CodeGenObjC/optimized-setter.m | 3 | ||||
-rw-r--r-- | test/CodeGenObjC/unoptimized-setter.m | 32 | ||||
-rw-r--r-- | test/Driver/darwin-ld.c | 4 | ||||
-rw-r--r-- | test/Driver/pic.c | 10 |
5 files changed, 81 insertions, 1 deletions
diff --git a/test/CodeGenObjC/optimized-setter-ios-device.m b/test/CodeGenObjC/optimized-setter-ios-device.m new file mode 100644 index 0000000000..6fa322ab0f --- /dev/null +++ b/test/CodeGenObjC/optimized-setter-ios-device.m @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=ios-6.0.0 -triple thumbv7-apple-ios6.0.0 -o - | FileCheck %s +// rdar://11915017 + +@interface I +// void objc_setProperty_nonatomic(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., NO, NO) +@property (nonatomic, retain) id nonatomicProperty; + +// void objc_setProperty_nonatomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., NO, YES) +@property (nonatomic, copy) id nonatomicPropertyCopy; + +// void objc_setProperty_atomic(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., YES, NO) +@property (retain) id atomicProperty; + +// void objc_setProperty_atomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., YES, YES) +@property (copy) id atomicPropertyCopy; +@end + +@implementation I +@synthesize nonatomicProperty; +@synthesize nonatomicPropertyCopy; +@synthesize atomicProperty; +@synthesize atomicPropertyCopy; +@end + +// CHECK: call arm_aapcscc void @objc_setProperty_nonatomic +// CHECK: call arm_aapcscc void @objc_setProperty_nonatomic_copy +// CHECK: call arm_aapcscc void @objc_setProperty_atomic +// CHECK: call arm_aapcscc void @objc_setProperty_atomic_copy + diff --git a/test/CodeGenObjC/optimized-setter.m b/test/CodeGenObjC/optimized-setter.m index 0e1b388595..6f5cfb1263 100644 --- a/test/CodeGenObjC/optimized-setter.m +++ b/test/CodeGenObjC/optimized-setter.m @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-macosx10.8.0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=macosx-10.8 -triple x86_64-apple-macosx10.8.0 -o - | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=ios-6.0.0 -triple x86_64-apple-ios6.0.0 -o - | FileCheck %s // rdar://10179974 @interface I diff --git a/test/CodeGenObjC/unoptimized-setter.m b/test/CodeGenObjC/unoptimized-setter.m new file mode 100644 index 0000000000..adcf087016 --- /dev/null +++ b/test/CodeGenObjC/unoptimized-setter.m @@ -0,0 +1,32 @@ +// RUN: %clang_cc1 %s -emit-llvm -fobjc-runtime=macosx-10.6.0 -triple x86_64-apple-macosx10.6.0 -o - | FileCheck %s +// rdar://11858187 + +@interface I +// void objc_setProperty_nonatomic(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., NO, NO) +@property (nonatomic, retain) id nonatomicProperty; + +// void objc_setProperty_nonatomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., NO, YES) +@property (nonatomic, copy) id nonatomicPropertyCopy; + +// void objc_setProperty_atomic(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., YES, NO) +@property (retain) id atomicProperty; + +// void objc_setProperty_atomic_copy(id self, SEL _cmd, id newValue, ptrdiff_t offset); +// objc_setProperty(..., YES, YES) +@property (copy) id atomicPropertyCopy; +@end + +@implementation I +@synthesize nonatomicProperty; +@synthesize nonatomicPropertyCopy; +@synthesize atomicProperty; +@synthesize atomicPropertyCopy; +@end + +// CHECK-NOT: call void @objc_setProperty_nonatomic +// CHECK-NOT: call void @objc_setProperty_nonatomic_copy +// CHECK-NOT: call void @objc_setProperty_atomic +// CHECK-NOT: call void @objc_setProperty_atomic_copy diff --git a/test/Driver/darwin-ld.c b/test/Driver/darwin-ld.c index 4cda37f9b2..2a3002b489 100644 --- a/test/Driver/darwin-ld.c +++ b/test/Driver/darwin-ld.c @@ -122,6 +122,10 @@ // RUN: FileCheck -check-prefix=LINK_NO_CRT1 %s < %t.log // LINK_NO_CRT1-NOT: crt +// RUN: %clang -target armv7-apple-ios6.0 -miphoneos-version-min=6.0 -### %t.o 2> %t.log +// RUN: FileCheck -check-prefix=LINK_NO_IOS_CRT1 %s < %t.log +// LINK_NO_IOS_CRT1-NOT: crt + // RUN: %clang -target i386-apple-darwin12 -pg -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK_PG %s < %t.log // LINK_PG: -lgcrt1.o diff --git a/test/Driver/pic.c b/test/Driver/pic.c index 52508a5b5c..23d9771cdd 100644 --- a/test/Driver/pic.c +++ b/test/Driver/pic.c @@ -93,3 +93,13 @@ // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC1 // RUN: %clang -c %s -target i386-apple-darwin -mdynamic-no-pic -fPIC -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC2 + +// Checks for ARM +// RUN: %clang -c %s -arch armv7 -fapple-kext -miphoneos-version-min=6.0.0 -### 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: %clang -c %s -arch armv7 -mkernel -miphoneos-version-min=6.0.0 -### 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: %clang -c %s -arch armv7 -fapple-kext -miphoneos-version-min=5.0.0 -### 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC +// RUN: %clang -c %s -arch armv7 -fapple-kext -miphoneos-version-min=6.0.0 -static -### 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC |