blob: 1f389269983913536731e60a0f05e3f7076f14fe [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -fobjc-exceptions -o - %s | FileCheck %s
John McCall7ec404c2010-10-16 08:21:07 +00002
3// rdar://problem/8535238
4// CHECK: declare void @objc_exception_rethrow()
5
6void protos() {
7 extern void foo();
8 @try {
9 foo();
10 } @catch (id e) {
11 @throw;
12 }
13}
John McCallfd186ac2010-10-16 16:34:08 +000014
15void throwing() {
16 @throw(@"error!");
17}
John McCalld768e9d2011-06-22 02:32:12 +000018
19// rdar://problem/9431547
20void die(void) __attribute__((nothrow, noreturn));
21void test2(void) {
22 @try {
23 die();
24 } @finally {
25 extern void test2_helper(void);
26 test2_helper();
27 }
28
29 // CHECK: define void @test2()
30 // CHECK-NOT: call void @test2_helper()
31}