Bill Wendling | 44b7d0a | 2007-10-18 18:26:40 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc -x objective-c %s -arch i386 -pipe -std=gnu99 -O2 -fexceptions -S -o - | not grep Unwind_Resume |
Bill Wendling | 0fbee66 | 2007-10-17 23:14:56 +0000 | [diff] [blame] | 2 | |
| 3 | #import <Foundation/Foundation.h> |
| 4 | |
| 5 | static NSMutableArray *anArray = nil; |
| 6 | |
| 7 | CFArrayRef bork(void) { |
| 8 | CFArrayRef result = NULL; |
| 9 | NSAutoreleasePool *pool = [NSAutoreleasePool new]; |
| 10 | @try { |
| 11 | result = CFRetain(anArray); |
| 12 | } @catch(id any) { |
| 13 | NSLog(@"Swallowed exception %@", any); |
| 14 | } |
| 15 | |
| 16 | [pool release]; |
| 17 | return result; |
| 18 | } |