File tree 1 file changed +16
-6
lines changed
1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,18 @@ upcall_call_shim_on_rust_stack(void *args, void *fn_ptr) {
54
54
55
55
/* *********************************************************************/
56
56
57
+ #ifdef __SEH__
58
+ # define PERSONALITY_FUNC __gxx_personality_seh0
59
+ #else
60
+ # ifdef __USING_SJLJ_EXCEPTIONS__
61
+ # define PERSONALITY_FUNC __gxx_personality_sjlj
62
+ # else
63
+ # define PERSONALITY_FUNC __gxx_personality_v0
64
+ # endif
65
+ #endif
66
+
57
67
extern " C" _Unwind_Reason_Code
58
- __gxx_personality_v0 (int version,
68
+ PERSONALITY_FUNC (int version,
59
69
_Unwind_Action actions,
60
70
uint64_t exception_class,
61
71
_Unwind_Exception *ue_header,
@@ -72,11 +82,11 @@ struct s_rust_personality_args {
72
82
73
83
extern " C" void
74
84
upcall_s_rust_personality (s_rust_personality_args *args) {
75
- args->retval = __gxx_personality_v0 (args->version ,
76
- args->actions ,
77
- args->exception_class ,
78
- args->ue_header ,
79
- args->context );
85
+ args->retval = PERSONALITY_FUNC (args->version ,
86
+ args->actions ,
87
+ args->exception_class ,
88
+ args->ue_header ,
89
+ args->context );
80
90
}
81
91
82
92
/* *
You can’t perform that action at this time.
0 commit comments