unwind: rename `__personality_routine` to `_Unwind_Personality_Fn`
This patch renames `__personality_routine` to `_Unwind_Personality_Fn`
in `unwind.h`. Both `unwind.h` from clang and GCC headers use this name
instead of `__personality_routine`. With this patch one is also able to
build libc++abi with libunwind support on Windows.
Patch by Markus Böck!
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 14798b44658c8b30b44afae20d0f391e88eb5bec
diff --git a/src/UnwindLevel1.c b/src/UnwindLevel1.c
index bcb1a7f..3e75b5f 100644
--- a/src/UnwindLevel1.c
+++ b/src/UnwindLevel1.c
@@ -90,8 +90,8 @@
// If there is a personality routine, ask it if it will want to stop at
// this frame.
if (frameInfo.handler != 0) {
- __personality_routine p =
- (__personality_routine)(uintptr_t)(frameInfo.handler);
+ _Unwind_Personality_Fn p =
+ (_Unwind_Personality_Fn)(uintptr_t)(frameInfo.handler);
_LIBUNWIND_TRACE_UNWINDING(
"unwind_phase1(ex_ojb=%p): calling personality function %p",
(void *)exception_object, (void *)(uintptr_t)p);
@@ -188,8 +188,8 @@
// If there is a personality routine, tell it we are unwinding.
if (frameInfo.handler != 0) {
- __personality_routine p =
- (__personality_routine)(uintptr_t)(frameInfo.handler);
+ _Unwind_Personality_Fn p =
+ (_Unwind_Personality_Fn)(uintptr_t)(frameInfo.handler);
_Unwind_Action action = _UA_CLEANUP_PHASE;
if (sp == exception_object->private_2) {
// Tell personality this was the frame it marked in phase 1.
@@ -294,8 +294,8 @@
// If there is a personality routine, tell it we are unwinding.
if (frameInfo.handler != 0) {
- __personality_routine p =
- (__personality_routine)(intptr_t)(frameInfo.handler);
+ _Unwind_Personality_Fn p =
+ (_Unwind_Personality_Fn)(intptr_t)(frameInfo.handler);
_LIBUNWIND_TRACE_UNWINDING(
"unwind_phase2_forced(ex_ojb=%p): calling personality function %p",
(void *)exception_object, (void *)(uintptr_t)p);