Bill Wendling | 4f78af8 | 2007-10-19 18:49:16 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc -x objective-c %s -pipe -std=gnu99 -O2 -fexceptions -S -o - | not grep Unwind_Resume |
Bill Wendling | 8c0247d | 2007-10-19 18:36:04 +0000 | [diff] [blame] | 2 | #import <stdio.h> |
Bill Wendling | d941718 | 2007-10-17 23:14:56 +0000 | [diff] [blame] | 3 | |
Bill Wendling | 8c0247d | 2007-10-19 18:36:04 +0000 | [diff] [blame] | 4 | @interface Foo { |
| 5 | char c; |
| 6 | short s; |
| 7 | int i; |
| 8 | long l; |
| 9 | float f; |
| 10 | double d; |
| 11 | } |
| 12 | -(Foo*)retain; |
| 13 | @end |
Bill Wendling | d941718 | 2007-10-17 23:14:56 +0000 | [diff] [blame] | 14 | |
Bill Wendling | 8c0247d | 2007-10-19 18:36:04 +0000 | [diff] [blame] | 15 | struct Foo *bork(Foo *FooArray) { |
| 16 | struct Foo *result = 0; |
| 17 | @try { |
| 18 | result = [FooArray retain]; |
| 19 | } @catch(id any) { |
| 20 | printf("hello world\n"); |
| 21 | } |
Bill Wendling | d941718 | 2007-10-17 23:14:56 +0000 | [diff] [blame] | 22 | |
Bill Wendling | 8c0247d | 2007-10-19 18:36:04 +0000 | [diff] [blame] | 23 | return result; |
Bill Wendling | d941718 | 2007-10-17 23:14:56 +0000 | [diff] [blame] | 24 | } |