diff options
author | Dan Albert <danalbert@google.com> | 2015-02-05 23:55:15 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-02-05 23:55:15 +0000 |
commit | f25c866ba6c188c1a1e4a5100a989b51f9e93f5c (patch) | |
tree | f2621cd22108bf164d7bfcca05c09d92a39ad396 /libcxxabi/include | |
parent | 8ab869010f3be37b51262ad139641084b88b6bf4 (diff) | |
download | bcm5719-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/include')
-rw-r--r-- | libcxxabi/include/__cxxabi_config.h | 20 | ||||
-rw-r--r-- | libcxxabi/include/cxxabi.h | 10 | ||||
-rw-r--r-- | libcxxabi/include/libunwind.h | 8 | ||||
-rw-r--r-- | libcxxabi/include/unwind.h | 10 |
4 files changed, 24 insertions, 24 deletions
diff --git a/libcxxabi/include/__cxxabi_config.h b/libcxxabi/include/__cxxabi_config.h new file mode 100644 index 00000000000..c040a0670f5 --- /dev/null +++ b/libcxxabi/include/__cxxabi_config.h @@ -0,0 +1,20 @@ +//===-------------------------- __cxxabi_config.h -------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef ____CXXABI_CONFIG_H +#define ____CXXABI_CONFIG_H + +#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ + !defined(__ARM_DWARF_EH__) +#define LIBCXXABI_ARM_EHABI 1 +#else +#define LIBCXXABI_ARM_EHABI 0 +#endif + +#endif // ____CXXABI_CONFIG_H diff --git a/libcxxabi/include/cxxabi.h b/libcxxabi/include/cxxabi.h index ae75f86483c..767acfef567 100644 --- a/libcxxabi/include/cxxabi.h +++ b/libcxxabi/include/cxxabi.h @@ -18,17 +18,11 @@ #include <stddef.h> #include <stdint.h> +#include <__cxxabi_config.h> + #define _LIBCPPABI_VERSION 1001 #define LIBCXXABI_NORETURN __attribute__((noreturn)) -// FIXME: This is also in unwind.h and libunwind.h, can we consolidate? -#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \ - !defined(__ARM_DWARF_EH__) && !defined(__APPLE__) -#define LIBCXXABI_ARM_EHABI 1 -#else -#define LIBCXXABI_ARM_EHABI 0 -#endif - #ifdef __cplusplus namespace std { diff --git a/libcxxabi/include/libunwind.h b/libcxxabi/include/libunwind.h index 9c695518765..b0f6979af3f 100644 --- a/libcxxabi/include/libunwind.h +++ b/libcxxabi/include/libunwind.h @@ -17,13 +17,7 @@ #include <stdint.h> #include <stddef.h> -// FIXME: This is also in unwind.h and cxxabi.h, can we consolidate? -#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \ - !defined(__ARM_DWARF_EH__) && !defined(__APPLE__) -#define LIBCXXABI_ARM_EHABI 1 -#else -#define LIBCXXABI_ARM_EHABI 0 -#endif +#include <__cxxabi_config.h> #ifdef __APPLE__ #include <Availability.h> diff --git a/libcxxabi/include/unwind.h b/libcxxabi/include/unwind.h index 6a265cc31fa..3d889cf40ac 100644 --- a/libcxxabi/include/unwind.h +++ b/libcxxabi/include/unwind.h @@ -23,13 +23,7 @@ #define LIBUNWIND_UNAVAIL #endif -// FIXME: This is also in cxxabi.h and libunwind.h, can we consolidate? -#if !defined(__USING_SJLJ_EXCEPTIONS__) && defined(__arm__) && \ - !defined(__ARM_DWARF_EH__) && !defined(__APPLE__) -#define LIBCXXABI_ARM_EHABI 1 -#else -#define LIBCXXABI_ARM_EHABI 0 -#endif +#include <__cxxabi_config.h> typedef enum { _URC_NO_REASON = 0, @@ -208,9 +202,7 @@ extern _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *context, _Unwind_VRS_RegClass regclass, uint32_t discriminator, _Unwind_VRS_DataRepresentation representation); -#endif -#if LIBCXXABI_ARM_EHABI static inline uintptr_t _Unwind_GetGR(struct _Unwind_Context* context, int index) { uintptr_t value = 0; |