rprichard created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
rprichard requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Use the same approach as used in libunwind/include/unwind_arm_ehabi.h
(D89570 <https://reviews.llvm.org/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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139503

Files:
  clang/lib/Headers/unwind.h


Index: clang/lib/Headers/unwind.h
===================================================================
--- clang/lib/Headers/unwind.h
+++ clang/lib/Headers/unwind.h
@@ -65,7 +65,8 @@
 #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;


Index: clang/lib/Headers/unwind.h
===================================================================
--- clang/lib/Headers/unwind.h
+++ clang/lib/Headers/unwind.h
@@ -65,7 +65,8 @@
 #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;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to