blob: 187998ed00617e635543d838fde9f07f939a0928 [file] [log] [blame]
Fariborz Jahanian8c89ff92009-12-14 21:35:01 +00001// RUN: clang -cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s
2
3#include <stdio.h>
4
5int 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