llvm-capstone/libunwind
Ed Schouten 3e29e7415e Improve readability and correctness of the OS specific libunwind bits.
All of the access to __exidx_*, dl_iterate_phdr(), etc. is specific to
the findUnwindSections() function. Right now all of the includes and
declarations related to them are scattered throughout the source file.
For example, for <link.h>, we have a full list of operating systems
guarding the #include, even though the code that uses dl_iterate_phdr()
miraculously doesn't use the same list.

Change the code so that findUnwindSections() is preceded by a block of
#ifdefs that share the same structure as the function itself. First
comes all of the macOS specific bits, followed by bare-metal ARM,
followed by ELF EHABI + DWARF.

This actually allows us to build a copy of libunwind without any
specific ifdefs for NetBSD, CloudABI, etc. It likely also unbreaks the
build of libunwind on FreeBSD/armv6, though I can't confirm.

Reviewed by:	compnerd
Differential Revision:	https://reviews.llvm.org/D30696

llvm-svn: 297174
2017-03-07 18:15:52 +00:00
..
cmake [CMake] Get libunwind building under LLVM/runtimes 2016-11-08 23:02:49 +00:00
include X86: swap EBP, ESP on !APPLE 2017-01-21 16:22:59 +00:00
src Improve readability and correctness of the OS specific libunwind bits. 2017-03-07 18:15:52 +00:00
test [libunwind] Properly align _Unwind_Exception. 2016-07-20 23:56:42 +00:00
.arcconfig Update .arcconfig 2016-07-20 23:56:17 +00:00
.clang-format
CMakeLists.txt [libunwind][CMake] Use libc++ headers when available 2017-02-16 05:18:08 +00:00
LICENSE.TXT Fix the project name in the license file. 2017-02-27 17:47:58 +00:00