summaryrefslogtreecommitdiff
path: root/include/__cxxabi_config.h
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
commit8414c5a5176832964a5c9789344cf39714846841 (patch)
treea412bdf45e137b9bfa8735f6bfd3d43fc2617dbf /include/__cxxabi_config.h
parentda5a6b1de034870097d881d8f7ab5b77e2ed4b7f (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/__cxxabi_config.h')
-rw-r--r--include/__cxxabi_config.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/__cxxabi_config.h b/include/__cxxabi_config.h
new file mode 100644
index 0000000..c040a06
--- /dev/null
+++ b/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