libcxxabi: declare __gnu_unwind_frame in cxa_personality - #189787
Conversation
|
@llvm/pr-subscribers-libcxxabi Author: Khem Raj (kraj) ChangesARM 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. Full diff: https://github.com/llvm/llvm-project/pull/189787.diff 1 Files Affected:
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 35f4e38077248..ddff277cc7b81 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
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
a2a457b to
3ac77d4
Compare
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@oss.qualcomm.com>
3ac77d4 to
e9d3306
Compare
|
Seems better than #189280 as there is no unrelated formatting. |
Good point. This is already in the |
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
#116261 moved this declaration to libunwind, so there should probably be a preprocessor guard in case it's already been declared (by building libcxxabi with libunwind). |
The formatting changes were required by the CI checks. In the end I'm not bothered which PR gets merged, so long as it's fixed! |
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
This is a fairly significant regression in 22.x and the fix is basically zero-risk, so let's just get this in. |
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@oss.qualcomm.com> (cherry picked from commit 8119f18)
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@oss.qualcomm.com>
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@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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. Upstream-Status: Submitted [llvm#189787] Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
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.