From 3241d400c86cf49e243643fdce3a408838754717 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 10 Feb 2010 18:49:11 +0000 Subject: 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 --- clang/test/CodeGenObjC/unwind-fn.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 clang/test/CodeGenObjC/unwind-fn.m (limited to 'clang/test/CodeGenObjC') 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(); + } +} -- cgit v1.2.3