Skip to content

Commit 7c79dfc

Browse files
committed
Add missing files.
1 parent aa775cf commit 7c79dfc

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Test/ObjCXXEHInterop_arc.m

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#import "Test.h"
2+
3+
#import "stdio.h"
4+
5+
void poke_objcxx(void);
6+
7+
void rethrow(id x)
8+
{
9+
@throw x;
10+
}
11+
12+
int main(void)
13+
{
14+
@try {
15+
printf("Poking from minRepM\n");
16+
poke_objcxx();
17+
printf("Poked from minRepM\n");
18+
} @catch (Test *localException) {
19+
printf("In NS_HANDLER block, %p\n", localException);
20+
}
21+
}
22+

Test/ObjCXXEHInterop_arc.mm

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#import "Test.h"
2+
#import "stdio.h"
3+
4+
extern "C" void rethrow(id);
5+
6+
7+
extern "C" void poke_objcxx(void)
8+
{
9+
@try {
10+
printf("Raising MyException\n");
11+
Test *e = [Test new];
12+
@throw e;
13+
} @catch (Test *localException) {
14+
printf("Caught - re-raising\n");
15+
rethrow(localException);
16+
}
17+
}
18+

0 commit comments

Comments
 (0)