summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC/exceptions.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/exceptions.m')
-rw-r--r--test/CodeGenObjC/exceptions.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenObjC/exceptions.m b/test/CodeGenObjC/exceptions.m
new file mode 100644
index 0000000..a74dee9
--- /dev/null
+++ b/test/CodeGenObjC/exceptions.m
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
+//
+// <rdar://problem/7471679> [irgen] [eh] Exception code built with clang (x86_64) crashes
+
+// Just check that we don't emit any dead blocks.
+//
+// RUN: grep 'No predecessors' %t | count 0
+
+@interface NSArray @end
+void f0() {
+ @try {
+ @try {
+ @throw @"a";
+ } @catch(NSArray *e) {
+ }
+ } @catch (id e) {
+ }
+}
OpenPOWER on IntegriCloud