From 0a8dfb51cdf4c5c61b567e3e0bfedd74d99ccd09 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 17 Oct 2007 23:14:56 +0000 Subject: [PATCH] Test to make sure we don't generate unwind info for non-64-bit Objective-C. llvm-svn: 43102 --- test/FrontendObjC/2007-10-17-SJLJExceptions.m | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/FrontendObjC/2007-10-17-SJLJExceptions.m diff --git a/test/FrontendObjC/2007-10-17-SJLJExceptions.m b/test/FrontendObjC/2007-10-17-SJLJExceptions.m new file mode 100644 index 00000000000..9d74d89ad91 --- /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 + +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; +}