summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-10 18:49:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-10 18:49:11 +0000
commit3241d400c86cf49e243643fdce3a408838754717 (patch)
treeb94a16b52e5a74d7576a8374fc1769387ca15251 /clang/test/CodeGenObjC
parent535fdaf0201487ce2e7b9a1c12643bdf55173b36 (diff)
downloadbcm5719-llvm-3241d400c86cf49e243643fdce3a408838754717.tar.gz
bcm5719-llvm-3241d400c86cf49e243643fdce3a408838754717.zip
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling, for Darwin ARM. llvm-svn: 95787
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/unwind-fn.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/unwind-fn.m b/clang/test/CodeGenObjC/unwind-fn.m
new file mode 100644
index 00000000000..0aa8cde024d
--- /dev/null
+++ b/clang/test/CodeGenObjC/unwind-fn.m
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck --check-prefix=DEFAULT_EH %s
+// RUN: %clang_cc1 -fsjlj-exceptions -fobjc-nonfragile-abi -emit-llvm -o - %s | FileCheck --check-prefix=SJLJ_EH %s
+
+// DEFAULT_EH: declare void @_Unwind_Resume_or_Rethrow(i8*)
+// SJLJ_EH: declare void @_Unwind_SjLj_Resume(i8*)
+
+void f1(), f2();
+void f0() {
+ @try {
+ f1();
+ } @catch (...) {
+ f2();
+ }
+}
OpenPOWER on IntegriCloud