[libcxxabi] r228809 - unwind: tweak inclusion ordering to work around GCC
Saleem Abdulrasool
compnerd at compnerd.org
Tue Feb 10 21:20:53 PST 2015
Author: compnerd
Date: Tue Feb 10 23:20:53 2015
New Revision: 228809
URL: http://llvm.org/viewvc/llvm-project?rev=228809&view=rev
Log:
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.
Modified:
libcxxabi/trunk/src/Unwind/Unwind-EHABI.cpp
libcxxabi/trunk/src/Unwind/libunwind.cpp
Modified: libcxxabi/trunk/src/Unwind/Unwind-EHABI.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/Unwind-EHABI.cpp?rev=228809&r1=228808&r2=228809&view=diff
==============================================================================
--- libcxxabi/trunk/src/Unwind/Unwind-EHABI.cpp (original)
+++ libcxxabi/trunk/src/Unwind/Unwind-EHABI.cpp Tue Feb 10 23:20:53 2015
@@ -20,6 +20,8 @@
#include <stdlib.h>
#include <string.h>
+#include <type_traits>
+
#include "config.h"
#include "libunwind.h"
#include "libunwind_ext.h"
Modified: libcxxabi/trunk/src/Unwind/libunwind.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/libunwind.cpp?rev=228809&r1=228808&r2=228809&view=diff
==============================================================================
--- libcxxabi/trunk/src/Unwind/libunwind.cpp (original)
+++ libcxxabi/trunk/src/Unwind/libunwind.cpp Tue Feb 10 23:20:53 2015
@@ -16,6 +16,9 @@
#include <cstdlib> // getenv
#endif
#include <new>
+#include <tuple>
+#include <memory>
+#include <vector>
#include "libunwind_ext.h"
#include "config.h"
More information about the cfe-commits
mailing list