[libcxx-commits] [libcxxabi] 8119f18 - libcxxabi: declare __gnu_unwind_frame in cxa_personality (#189787)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 27 00:35:29 PDT 2026


Author: Khem Raj
Date: 2026-04-27T09:35:24+02:00
New Revision: 8119f1854948b50358bbfaea08f207f51970f06c

URL: https://github.com/llvm/llvm-project/commit/8119f1854948b50358bbfaea08f207f51970f06c
DIFF: https://github.com/llvm/llvm-project/commit/8119f1854948b50358bbfaea08f207f51970f06c.diff

LOG: libcxxabi: declare __gnu_unwind_frame in cxa_personality (#189787)

ARM EHABI builds of libcxxabi fail with clang-22+ because
cxa_personality.cpp calls __gnu_unwind_frame without a visible
declaration, triggering:

  error: use of undeclared identifier '__gnu_unwind_frame'

Add an extern "C" forward declaration before the EHABI unwind helper so
the source compiles correctly.

Signed-off-by: Khem Raj <khem.raj at oss.qualcomm.com>

Added: 
    

Modified: 
    libcxxabi/src/cxa_personality.cpp

Removed: 
    


################################################################################
diff  --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 35f4e38077248..6599f89740113 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -1116,6 +1116,8 @@ __gxx_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame,
 
 #else
 
+extern "C" _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*, _Unwind_Context*);
+
 // Helper function to unwind one frame.
 // ARM EHABI 7.3 and 7.4: If the personality function returns _URC_CONTINUE_UNWIND, the
 // personality routine should update the virtual register set (VRS) according to the


        


More information about the libcxx-commits mailing list