From 578ea4f7ef67d589f0ca7d10ec9e383333567421 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 9 Dec 2022 15:15:22 -0800 Subject: [PATCH] [Headers][ARM] Allow `struct _Unwind_Exception` in unwind.h Use the same approach as used in libunwind/include/unwind_arm_ehabi.h (D89570) and GCC's unwind-arm-common.h, so that _Unwind_Exception can be used both with and without the struct tag. Fixes a build failure in libcxxabi/test/forced_unwind1.pass.cpp. Reviewed By: danielkiss Differential Revision: https://reviews.llvm.org/D139503 (cherry picked from commit 106a99276f9e7b9eec9542cc2b4dcd8489eb1a6b) --- clang/lib/Headers/unwind.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Headers/unwind.h b/clang/lib/Headers/unwind.h index 971a62da0d21..33e1792cd1fb 100644 --- a/clang/lib/Headers/unwind.h +++ b/clang/lib/Headers/unwind.h @@ -65,7 +65,8 @@ struct _Unwind_Context; #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || \ defined(__ARM_DWARF_EH__) || defined(__SEH__)) struct _Unwind_Control_Block; -typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */ +typedef struct _Unwind_Control_Block _Unwind_Control_Block; +#define _Unwind_Exception _Unwind_Control_Block /* Alias */ #else struct _Unwind_Exception; typedef struct _Unwind_Exception _Unwind_Exception;