summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-02-05 23:55:15 +0000
committerDan Albert <danalbert@google.com>2015-02-05 23:55:15 +0000
commitf25c866ba6c188c1a1e4a5100a989b51f9e93f5c (patch)
treef2621cd22108bf164d7bfcca05c09d92a39ad396 /libcxxabi/src
parent8ab869010f3be37b51262ad139641084b88b6bf4 (diff)
downloadbcm5719-llvm-f25c866ba6c188c1a1e4a5100a989b51f9e93f5c.tar.gz
bcm5719-llvm-f25c866ba6c188c1a1e4a5100a989b51f9e93f5c.zip
[libcxxabi] Fix -Werror build for 32-bit non-ARM.
Summary: The inclusion of Unwind-EHABI.h was insufficiently guarded (LIBCXXABI_ARM_EHABI was beign checked without ever being defined). Move the check into the header file itself, add the check to the source file, and clean up the existing checks. LIBCXXABI_ARM_EHABI didn't have a canonical defintion; it was duplicated across cxxabi.h, libunwind.h, and unwind.h. Move the definition into __cxxabi_config.h and clean up the old cruft (note: we will have to ship this header). There are also a few drive-by formatting/whitespace cleanups. Reviewers: jroelofs, thakis, compnerd Reviewed By: compnerd Subscribers: compnerd, aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D7419 llvm-svn: 228363
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/Unwind/Unwind-EHABI.cpp3
-rw-r--r--libcxxabi/src/Unwind/Unwind-EHABI.h6
-rw-r--r--libcxxabi/src/Unwind/UnwindCursor.hpp10
-rw-r--r--libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c9
4 files changed, 13 insertions, 15 deletions
diff --git a/libcxxabi/src/Unwind/Unwind-EHABI.cpp b/libcxxabi/src/Unwind/Unwind-EHABI.cpp
index 3211cf1b562..e2fced21f4b 100644
--- a/libcxxabi/src/Unwind/Unwind-EHABI.cpp
+++ b/libcxxabi/src/Unwind/Unwind-EHABI.cpp
@@ -12,7 +12,7 @@
#include "Unwind-EHABI.h"
-#include <unwind.h>
+#if LIBCXXABI_ARM_EHABI
#include <stdbool.h>
#include <stdint.h>
@@ -26,7 +26,6 @@
#include "unwind.h"
#include "../private_typeinfo.h"
-#if LIBCXXABI_ARM_EHABI
namespace {
// Strange order: take words in order, but inside word, take from most to least
diff --git a/libcxxabi/src/Unwind/Unwind-EHABI.h b/libcxxabi/src/Unwind/Unwind-EHABI.h
index 2011a67c70a..5a3c293f3d8 100644
--- a/libcxxabi/src/Unwind/Unwind-EHABI.h
+++ b/libcxxabi/src/Unwind/Unwind-EHABI.h
@@ -11,6 +11,10 @@
#ifndef __UNWIND_EHABI_H__
#define __UNWIND_EHABI_H__
+#include <__cxxabi_config.h>
+
+#if LIBCXXABI_ARM_EHABI
+
#include <stdint.h>
#include <unwind.h>
@@ -44,6 +48,6 @@ extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr2(
} // extern "C"
#endif
-#endif
+#endif // LIBCXXABI_ARM_EHABI
#endif // __UNWIND_EHABI_H__
diff --git a/libcxxabi/src/Unwind/UnwindCursor.hpp b/libcxxabi/src/Unwind/UnwindCursor.hpp
index db6e188a342..b50c09e50e9 100644
--- a/libcxxabi/src/Unwind/UnwindCursor.hpp
+++ b/libcxxabi/src/Unwind/UnwindCursor.hpp
@@ -23,17 +23,15 @@
#include <mach-o/dyld.h>
#endif
-#include "libunwind.h"
+#include "config.h"
#include "AddressSpace.hpp"
-#include "Registers.hpp"
-#include "DwarfInstructions.hpp"
#include "CompactUnwinder.hpp"
#include "config.h"
-
-#if LIBCXXABI_ARM_EHABI
+#include "DwarfInstructions.hpp"
+#include "libunwind.h"
+#include "Registers.hpp"
#include "Unwind-EHABI.h"
-#endif
namespace libunwind {
diff --git a/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c b/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
index b8c70bf0a34..4c2e9cc1c26 100644
--- a/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
+++ b/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
@@ -16,14 +16,11 @@
#include <stdio.h>
#include <stdlib.h>
-#include "libunwind.h"
-#include "unwind.h"
-#include "libunwind_ext.h"
#include "config.h"
-
-#if LIBCXXABI_ARM_EHABI
+#include "libunwind_ext.h"
+#include "libunwind.h"
#include "Unwind-EHABI.h"
-#endif
+#include "unwind.h"
#if _LIBUNWIND_BUILD_ZERO_COST_APIS
OpenPOWER on IntegriCloud