diff options
| author | Ted Kremenek <kremenek@apple.com> | 2012-03-06 20:05:56 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2012-03-06 20:05:56 +0000 |
| commit | e65b086e07a6345d8eb85bf84f3899368c233348 (patch) | |
| tree | 44a8c1e8e3da0b53a3167bcdb1fdb325f11f308c /clang/test/CodeGenObjC/optimized-setter.m | |
| parent | de850676e0206af165d62ad4c99e657c67a49e86 (diff) | |
| download | bcm5719-llvm-e65b086e07a6345d8eb85bf84f3899368c233348.tar.gz bcm5719-llvm-e65b086e07a6345d8eb85bf84f3899368c233348.zip | |
Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
Diffstat (limited to 'clang/test/CodeGenObjC/optimized-setter.m')
| -rw-r--r-- | clang/test/CodeGenObjC/optimized-setter.m | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/optimized-setter.m b/clang/test/CodeGenObjC/optimized-setter.m new file mode 100644 index 00000000000..0e1b3885951 --- /dev/null +++ b/clang/test/CodeGenObjC/optimized-setter.m @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-macosx10.8.0 -o - | FileCheck %s +// rdar://10179974 + +@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 void @objc_setProperty_nonatomic +// CHECK: call void @objc_setProperty_nonatomic_copy +// CHECK: call void @objc_setProperty_atomic +// CHECK: call void @objc_setProperty_atomic_copy + |

