X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FFrontendObjC%2F2007-10-17-SJLJExceptions.m;h=970207e0d8a413ee16f5c64337e8163989af8e5c;hb=d5ce456161b81a50c2e0dcf948192c1a4e1c8d22;hp=48b8e8e95c6973301dc8c2c9721b05be3b3a8c9f;hpb=50c26b642c339c430eaef7ebf516063daa93186d;p=oota-llvm.git diff --git a/test/FrontendObjC/2007-10-17-SJLJExceptions.m b/test/FrontendObjC/2007-10-17-SJLJExceptions.m index 48b8e8e95c6..970207e0d8a 100644 --- a/test/FrontendObjC/2007-10-17-SJLJExceptions.m +++ b/test/FrontendObjC/2007-10-17-SJLJExceptions.m @@ -1,18 +1,24 @@ -// RUN: %llvmgcc -x objective-c %s -arch i386 -pipe -std=gnu99 -O2 -fexceptions -S -o - | not grep Unwind_Resume +// RUN: %llvmgcc -m32 -x objective-c %s -pipe -std=gnu99 -O2 -fexceptions -S -o - | not grep Unwind_Resume +#import -#import - -static NSMutableArray *anArray = nil; +@interface Foo { + char c; + short s; + int i; + long l; + float f; + double d; +} +-(Foo*)retain; +@end -CFArrayRef bork(void) { - CFArrayRef result = NULL; - NSAutoreleasePool *pool = [NSAutoreleasePool new]; - @try { - result = CFRetain(anArray); - } @catch(id any) { - NSLog(@"Swallowed exception %@", any); - } +struct Foo *bork(Foo *FooArray) { + struct Foo *result = 0; + @try { + result = [FooArray retain]; + } @catch(id any) { + printf("hello world\n"); + } - [pool release]; - return result; + return result; }