aboutsummaryrefslogtreecommitdiff
path: root/test
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
commitb2987d159a88ab0ee2e40c884eb4d77b42ab89b6 (patch)
tree3eebe054a24d19f17a9c348257c61f36323b65b8 /test
parent809b9bb733d6b65883a89eae0cf20c1635cff141 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGenObjC/unwind-fn.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGenObjC/unwind-fn.m b/test/CodeGenObjC/unwind-fn.m
new file mode 100644
index 0000000000..0aa8cde024
--- /dev/null
+++ b/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();
+ }
+}