summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjCXX
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-10 19:02:56 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-10 19:02:56 +0000
commit1eab052a7fb49194eb9a8d3c545975cccd3a1e1a (patch)
treeabe14fd41ef4c34ae20a6e6834f3008e7450d2df /clang/test/CodeGenObjCXX
parentf036f1a630943627e5bcd344ace9d7a7b617154d (diff)
downloadbcm5719-llvm-1eab052a7fb49194eb9a8d3c545975cccd3a1e1a.tar.gz
bcm5719-llvm-1eab052a7fb49194eb9a8d3c545975cccd3a1e1a.zip
objectiveC++: When throwing c++ exception of
an objectiveC object, use objc_exception_throw to raise the exception. // rdar://12605907 llvm-svn: 172091
Diffstat (limited to 'clang/test/CodeGenObjCXX')
-rw-r--r--clang/test/CodeGenObjCXX/exceptions.mm18
1 files changed, 17 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjCXX/exceptions.mm b/clang/test/CodeGenObjCXX/exceptions.mm
index ce6d20aa98b..b3f73b1f9d5 100644
--- a/clang/test/CodeGenObjCXX/exceptions.mm
+++ b/clang/test/CodeGenObjCXX/exceptions.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - %s | FileCheck %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -fobjc-exceptions -o - %s | FileCheck %s
@interface OCType @end
void opaque();
@@ -16,3 +16,19 @@ namespace test0 {
}
}
}
+
+// rdar://12605907
+@interface NSException
+ - new;
+@end
+namespace test1 {
+
+ void bar() {
+ @try {
+ throw [NSException new];
+ } @catch (id i) {
+ }
+ }
+// CHECK: invoke void @objc_exception_throw(i8* [[CALL:%.*]]) noreturn
+// CHECK: to label [[INVOKECONT1:%.*]] unwind label [[LPAD:%.*]]
+}
OpenPOWER on IntegriCloud