unwind: tweak inclusion ordering to work around GCC

This is a slightly convoluted workaround.  GCC does not support the
__has_feature extension of clang, and this results in some issues with
static_asserts.  config.h defines static_assert as a macro with a C-specific
trickery.  This then propagates into the C++ headers included after config.h,
which are used with C++11 mode, enabling constexpr constructors.  The macro'ed
static_assert does not get treated as the static_assert builtin, and will cause
an error due to a non-empty constexpr constructor.  Tweaking the include order
permits the use of libc++ headers to build libunwind with GCC on Linux.

llvm-svn: 228809
This commit is contained in:
Saleem Abdulrasool 2015-02-11 05:20:53 +00:00
parent b8a83fdf5c
commit a9bd96e76a
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,8 @@
#include <stdlib.h>
#include <string.h>
#include <type_traits>
#include "config.h"
#include "libunwind.h"
#include "libunwind_ext.h"

View File

@ -16,6 +16,9 @@
#include <cstdlib> // getenv
#endif
#include <new>
#include <tuple>
#include <memory>
#include <vector>
#include "libunwind_ext.h"
#include "config.h"