summaryrefslogtreecommitdiffstats
path: root/libcxx/include/exception
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-10 08:57:35 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-10 08:57:35 +0000
commitd22c9dc4222bb875be4efb496396b8b449a09e57 (patch)
tree611813b10b6d06f96d472103dcb4c277eeda9ade /libcxx/include/exception
parent7bc6028d7d53351f7131e7d4f2f9bfc2ee2679b7 (diff)
downloadbcm5719-llvm-d22c9dc4222bb875be4efb496396b8b449a09e57.tar.gz
bcm5719-llvm-d22c9dc4222bb875be4efb496396b8b449a09e57.zip
Recommit "Split exception.cpp and new.cpp implementation into different files for different runtimes."
This recommits r294707 with additional fixes. The main difference is libc++ now correctly builds without any ABI library. exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. llvm-svn: 294730
Diffstat (limited to 'libcxx/include/exception')
-rw-r--r--libcxx/include/exception6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception
index 98e1f37f919..db11c36d806 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -82,6 +82,10 @@ template <class E> void rethrow_if_nested(const E& e);
#include <cstdlib>
#include <type_traits>
+#if defined(_LIBCPP_ABI_MICROSOFT)
+#include <vcruntime_exception.h>
+#endif
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@@ -89,6 +93,7 @@ template <class E> void rethrow_if_nested(const E& e);
namespace std // purposefully not using versioning namespace
{
+#if !defined(_LIBCPP_ABI_MICROSOFT)
class _LIBCPP_EXCEPTION_ABI exception
{
public:
@@ -105,6 +110,7 @@ public:
virtual ~bad_exception() _NOEXCEPT;
virtual const char* what() const _NOEXCEPT;
};
+#endif // !_LIBCPP_ABI_MICROSOFT
typedef void (*unexpected_handler)();
_LIBCPP_FUNC_VIS unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
OpenPOWER on IntegriCloud