[cfe-commits] r138172 - in /cfe/trunk/test/CodeGenObjC: 2007-04-03-ObjcEH.m 2007-05-02-Strong.m 2007-10-18-ProDescriptor.m 2007-10-23-GC-WriteBarrier.m 2008-10-3-EhValue.m 2008-11-12-Metadata.m 2008-11-24-ConstCFStrings.m
Eric Christopher
echristo at apple.com
Fri Aug 19 17:37:56 PDT 2011
Author: echristo
Date: Fri Aug 19 19:37:56 2011
New Revision: 138172
URL: http://llvm.org/viewvc/llvm-project?rev=138172&view=rev
Log:
Migrate, FileCheckize and update:
2007-04-03-ObjcEH.m
2007-05-02-Strong.m
2007-10-18-ProDescriptor.m
2007-10-23-GC-WriteBarrier.m
2008-10-3-EhValue.m
2008-11-12-Metadata.m
2008-11-24-ConstCFStrings.m
from llvm/test/FrontendObjC.
Added:
cfe/trunk/test/CodeGenObjC/2007-04-03-ObjcEH.m
cfe/trunk/test/CodeGenObjC/2007-05-02-Strong.m
cfe/trunk/test/CodeGenObjC/2007-10-18-ProDescriptor.m
cfe/trunk/test/CodeGenObjC/2007-10-23-GC-WriteBarrier.m
cfe/trunk/test/CodeGenObjC/2008-10-3-EhValue.m
cfe/trunk/test/CodeGenObjC/2008-11-12-Metadata.m
cfe/trunk/test/CodeGenObjC/2008-11-24-ConstCFStrings.m
Added: cfe/trunk/test/CodeGenObjC/2007-04-03-ObjcEH.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2007-04-03-ObjcEH.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2007-04-03-ObjcEH.m (added)
+++ cfe/trunk/test/CodeGenObjC/2007-04-03-ObjcEH.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,27 @@
+// RUN: %clang -fexceptions -S -emit-llvm %s -o -
+
+ at interface B
+-(int)bar;
+ at end
+
+ at interface A
+-(void) Foo:(int) state;
+ at end
+
+ at implementation A
+- (void) Foo:(int) state {
+
+ int wasResponded = 0;
+ @try {
+ if (state) {
+ B * b = 0;
+ @try { }
+ @finally {
+ wasResponded = ![b bar];
+ }
+ }
+ }
+ @finally {
+ }
+}
+ at end
Added: cfe/trunk/test/CodeGenObjC/2007-05-02-Strong.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2007-05-02-Strong.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2007-05-02-Strong.m (added)
+++ cfe/trunk/test/CodeGenObjC/2007-05-02-Strong.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -S %s -fobjc-gc -o /dev/null
+typedef int NSInteger;
+typedef struct _NSRect {
+ int origin;
+ int size;
+} NSRect;
+
+__attribute__((objc_gc(strong))) NSRect *_cachedRectArray;
+extern const NSRect NSZeroRect;
+ at interface A{
+}
+-(void)bar:(NSInteger *)rectCount;
+ at end
+
+ at implementation A
+
+-(void)bar:(NSInteger *)rectCount {
+ NSRect appendRect = NSZeroRect;
+
+ _cachedRectArray[*rectCount - 1] = NSZeroRect;
+}
+
+ at end
Added: cfe/trunk/test/CodeGenObjC/2007-10-18-ProDescriptor.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2007-10-18-ProDescriptor.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2007-10-18-ProDescriptor.m (added)
+++ cfe/trunk/test/CodeGenObjC/2007-10-18-ProDescriptor.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -emit-llvm %s -o /dev/null
+ at protocol O
+ at end
+ at interface O < O > {
+}
+ at end
+struct A {
+};
+ at protocol AB
+- (unsigned) ver;
+ at end
+ at interface AGy:O < AB > {
+}
+ at end
+ at implementation AGy
+- (unsigned) ver {
+}
+ at end
Added: cfe/trunk/test/CodeGenObjC/2007-10-23-GC-WriteBarrier.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2007-10-23-GC-WriteBarrier.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2007-10-23-GC-WriteBarrier.m (added)
+++ cfe/trunk/test/CodeGenObjC/2007-10-23-GC-WriteBarrier.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -emit-llvm %s -o /dev/null -fobjc-gc
+// rdar://5541393
+
+typedef unsigned int NSUInteger;
+__attribute__((objc_gc(strong))) float *_scores;
+
+void foo(int i, float f) {
+ _scores[i] = f;
+}
Added: cfe/trunk/test/CodeGenObjC/2008-10-3-EhValue.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2008-10-3-EhValue.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2008-10-3-EhValue.m (added)
+++ cfe/trunk/test/CodeGenObjC/2008-10-3-EhValue.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,50 @@
+// RUN: %clang -fexceptions -S -emit-llvm %s -o /dev/null
+
+ at interface Object {
+ at public
+ Class isa;
+}
++initialize;
++alloc;
++new;
++free;
+-free;
++(Class)class;
+-(Class)class;
+-init;
+-superclass;
+-(const char *)name;
+ at end
+
+ at interface Frob: Object
+ at end
+
+ at implementation Frob: Object
+ at end
+
+static Frob* _connection = ((void *)0);
+
+extern void abort(void);
+
+void test (Object* sendPort)
+{
+ int cleanupPorts = 1;
+ Frob* receivePort = ((void *)0);
+
+ @try {
+ receivePort = (Frob *) -1;
+ _connection = (Frob *) -1;
+ receivePort = ((void *)0);
+ sendPort = ((void *)0);
+ cleanupPorts = 0;
+ @throw [Object new];
+ }
+ @catch(Frob *obj) {
+ if(!(0)) abort();
+ }
+ @catch(id exc) {
+ if(!(!receivePort)) abort();
+ if(!(!sendPort)) abort();
+ if(!(!cleanupPorts)) abort();
+ }
+}
Added: cfe/trunk/test/CodeGenObjC/2008-11-12-Metadata.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2008-11-12-Metadata.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2008-11-12-Metadata.m (added)
+++ cfe/trunk/test/CodeGenObjC/2008-11-12-Metadata.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin %s -o /dev/null
+
+ at interface A
+ at end
+ at protocol P
+ at end
+ at interface B : A <P>
+{
+}
+ at end
+ at implementation B
+- (void)test {
+}
+ at end
Added: cfe/trunk/test/CodeGenObjC/2008-11-24-ConstCFStrings.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/2008-11-24-ConstCFStrings.m?rev=138172&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/2008-11-24-ConstCFStrings.m (added)
+++ cfe/trunk/test/CodeGenObjC/2008-11-24-ConstCFStrings.m Fri Aug 19 19:37:56 2011
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin %s -o - | FileCheck %s
+
+// CHECK: _unnamed_cfstring_
+
+ at class NSString;
+
+ at interface A
+- (void)bork:(NSString*)msg;
+ at end
+
+void func(A *a) {
+ [a bork:@"Hello world!"];
+}
More information about the cfe-commits
mailing list