[libcxx-commits] [PATCH] D86766: [libunwind] Fix a few libunwind includes

Ryan Prichard via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 28 00:50:31 PDT 2020


rprichard created this revision.
rprichard added reviewers: compnerd, mstorsjo.
Herald added projects: LLVM, libunwind.
Herald added subscribers: libcxx-commits, llvm-commits.
Herald added a reviewer: libunwind.
rprichard requested review of this revision.

In UnwindCursor.hpp, include config.h before checking
_LIBUNWIND_SUPPORT_SEH_UNWIND.

Include libunwind_ext.h for UNW_STEP_SUCCESS.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86766

Files:
  libunwind/src/CompactUnwinder.hpp
  libunwind/src/DwarfInstructions.hpp
  libunwind/src/UnwindCursor.hpp


Index: libunwind/src/UnwindCursor.hpp
===================================================================
--- libunwind/src/UnwindCursor.hpp
+++ libunwind/src/UnwindCursor.hpp
@@ -24,6 +24,17 @@
   #include <mach-o/dyld.h>
 #endif
 
+#include "AddressSpace.hpp"
+#include "CompactUnwinder.hpp"
+#include "config.h"
+#include "DwarfInstructions.hpp"
+#include "EHHeaderParser.hpp"
+#include "libunwind.h"
+#include "libunwind_ext.h"
+#include "Registers.hpp"
+#include "RWMutex.hpp"
+#include "Unwind-EHABI.h"
+
 #if defined(_LIBUNWIND_SUPPORT_SEH_UNWIND)
 // Provide a definition for the DISPATCHER_CONTEXT struct for old (Win7 and
 // earlier) SDKs.
@@ -61,18 +72,6 @@
 
 #endif
 
-#include "config.h"
-
-#include "AddressSpace.hpp"
-#include "CompactUnwinder.hpp"
-#include "config.h"
-#include "DwarfInstructions.hpp"
-#include "EHHeaderParser.hpp"
-#include "libunwind.h"
-#include "Registers.hpp"
-#include "RWMutex.hpp"
-#include "Unwind-EHABI.h"
-
 namespace libunwind {
 
 #if defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)
Index: libunwind/src/DwarfInstructions.hpp
===================================================================
--- libunwind/src/DwarfInstructions.hpp
+++ libunwind/src/DwarfInstructions.hpp
@@ -16,10 +16,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "dwarf2.h"
-#include "Registers.hpp"
 #include "DwarfParser.hpp"
+#include "Registers.hpp"
 #include "config.h"
+#include "dwarf2.h"
+#include "libunwind_ext.h"
 
 
 namespace libunwind {
Index: libunwind/src/CompactUnwinder.hpp
===================================================================
--- libunwind/src/CompactUnwinder.hpp
+++ libunwind/src/CompactUnwinder.hpp
@@ -19,6 +19,7 @@
 #include <mach-o/compact_unwind_encoding.h>
 
 #include "Registers.hpp"
+#include "libunwind_ext.h"
 
 #define EXTRACT_BITS(value, mask)                                              \
   ((value >> __builtin_ctz(mask)) & (((1 << __builtin_popcount(mask))) - 1))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86766.288540.patch
Type: text/x-patch
Size: 1944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200828/83369a24/attachment.bin>


More information about the libcxx-commits mailing list