summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjCXX/exceptions.mm
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjCXX/exceptions.mm')
-rw-r--r--test/CodeGenObjCXX/exceptions.mm17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/exceptions.mm b/test/CodeGenObjCXX/exceptions.mm
new file mode 100644
index 0000000..00de88c
--- /dev/null
+++ b/test/CodeGenObjCXX/exceptions.mm
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-nonfragile-abi -fexceptions -o - %s | FileCheck %s
+
+@interface OCType @end
+void opaque();
+
+namespace test0 {
+
+ // CHECK: define void @_ZN5test03fooEv
+ void foo() {
+ try {
+ // CHECK: invoke void @_Z6opaquev
+ opaque();
+ } catch (OCType *T) {
+ // CHECK: call i32 (i8*, i8*, ...)* @llvm.eh.selector({{.*}} @__objc_personality_v0 {{.*}} @"OBJC_EHTYPE_$_OCType"
+ }
+ }
+}
OpenPOWER on IntegriCloud