blob: 5576c1640d1881a24160c93bc6ea9b46e30c2ba2 [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi -emit-llvm -fobjc-exceptions %s -o - | FileCheck %s
Fariborz Jahanian8c89ff92009-12-14 21:35:01 +00002
Fariborz Jahanian42f8d002009-12-14 22:17:35 +00003
4extern int printf(const char*, ...);
Fariborz Jahanian8c89ff92009-12-14 21:35:01 +00005
6int main()
7{
8 @try {
9 @throw @"foo";
10 } @catch (id e) {
11 @try {
12// CHECK: call void @objc_exception_throw
13 @throw;
14 } @catch (id e) {
15 if (e) {
16 printf("caught \n");
17 } else {
18 printf("caught (WRONG)\n");
19 }
20 } @catch (...) {
21 printf("caught nothing (WRONG)\n");
22 }
23 }
24}
25