Fariborz Jahanian | 8c89ff9 | 2009-12-14 21:35:01 +0000 | [diff] [blame] | 1 | // RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s |
2 | |||||
3 | #include <stdio.h> | ||||
4 | |||||
5 | int main() | ||||
6 | { | ||||
7 | @try { | ||||
8 | @throw @"foo"; | ||||
9 | } @catch (id e) { | ||||
10 | @try { | ||||
11 | // CHECK: call void @objc_exception_throw | ||||
12 | @throw; | ||||
13 | } @catch (id e) { | ||||
14 | if (e) { | ||||
15 | printf("caught \n"); | ||||
16 | } else { | ||||
17 | printf("caught (WRONG)\n"); | ||||
18 | } | ||||
19 | } @catch (...) { | ||||
20 | printf("caught nothing (WRONG)\n"); | ||||
21 | } | ||||
22 | } | ||||
23 | } | ||||
24 |