// -*- C++ -*- The GNU C++ exception personality routine.
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-// 2011
-// Free Software Foundation, Inc.
+// Copyright (C) 2001-2013 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
#ifdef _GLIBCXX_SJLJ_EXCEPTIONS
#define PERSONALITY_FUNCTION __gxx_personality_sj0
#define __builtin_eh_return_data_regno(x) x
+#elif defined(__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
+#define PERSONALITY_FUNCTION __gxx_personality_imp
#else
#define PERSONALITY_FUNCTION __gxx_personality_v0
#endif
-extern "C" _Unwind_Reason_Code
+#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
+static
+#else
+extern "C"
+#endif
+_Unwind_Reason_Code
#ifdef __ARM_EABI_UNWINDER__
PERSONALITY_FUNCTION (_Unwind_State state,
struct _Unwind_Exception* ue_header,
if (check_exception_spec (&info, __get_exception_header_from_obj
(new_ptr)->exceptionType,
new_ptr, xh_switch_value))
- __throw_exception_again;
+ { __throw_exception_again; }
// If the exception spec allows std::bad_exception, throw that.
// We don't have a thrown object to compare against, but since
}
#endif
+#if defined (__SEH__) && !defined (_GLIBCXX_SJLJ_EXCEPTIONS)
+extern "C"
+EXCEPTION_DISPOSITION
+__gxx_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
+ PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp)
+{
+ return _GCC_specific_handler (ms_exc, this_frame, ms_orig_context,
+ ms_disp, __gxx_personality_imp);
+}
+#endif /* SEH */
+
} // namespace __cxxabiv1