llvm-6502/test/FrontendObjC/2007-10-17-SJLJExceptions.m
2007-10-17 23:14:56 +00:00

19 lines
449 B
Objective-C

// RUN: %llvmgcc -x objective-c -arch i386 -pipe -std=gnu99 -O2 -fexceptions -S -o - t.m | not grep Unwind_Resume
#import <Foundation/Foundation.h>
static NSMutableArray *anArray = nil;
CFArrayRef bork(void) {
CFArrayRef result = NULL;
NSAutoreleasePool *pool = [NSAutoreleasePool new];
@try {
result = CFRetain(anArray);
} @catch(id any) {
NSLog(@"Swallowed exception %@", any);
}
[pool release];
return result;
}