From 2a900682b99e546e611f388ddddd543184511ea7 Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 11 Mar 2019 03:57:44 -0400 Subject: unwind-c.c: added proper support for target-provided exception filters. --- gcc/unwind-c.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/unwind-c.c b/gcc/unwind-c.c index 86b9f5570..ea5675bad 100644 --- a/gcc/unwind-c.c +++ b/gcc/unwind-c.c @@ -93,6 +93,8 @@ parse_lsda_header (struct _Unwind_Context *context, const unsigned char *p, #ifdef __USING_SJLJ_EXCEPTIONS__ #define PERSONALITY_FUNCTION __gcc_personality_sj0 #define __builtin_eh_return_data_regno(x) x +#elif defined(TARGET_PERSONALITY_FUNCTION) +#define PERSONALITY_FUNCTION __gcc_personality_imp #else #define PERSONALITY_FUNCTION __gcc_personality_v0 #endif @@ -107,6 +109,10 @@ PERSONALITY_FUNCTION (_Unwind_State state, struct _Unwind_Exception * ue_header, struct _Unwind_Context * context) #else + +#ifdef TARGET_PERSONALITY_FUNCTION +static +#endif _Unwind_Reason_Code PERSONALITY_FUNCTION (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); -- cgit v1.2.3