diff options
-rw-r--r-- | test/FrontendObjC/2007-10-17-SJLJExceptions.m | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/FrontendObjC/2007-10-17-SJLJExceptions.m b/test/FrontendObjC/2007-10-17-SJLJExceptions.m new file mode 100644 index 0000000000..9d74d89ad9 --- /dev/null +++ b/test/FrontendObjC/2007-10-17-SJLJExceptions.m @@ -0,0 +1,18 @@ +// 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; +} |