summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-28 05:20:27 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-28 05:20:27 +0000
commitab768a85f686d8334d9c96752e5da1ee14c119cb (patch)
treecff5477b59f667597383c7da9718ad002e4b0a2e /libcxx
parent687d3213f0c26fdd06f54544ef74cfd4d628a35a (diff)
downloadbcm5719-llvm-ab768a85f686d8334d9c96752e5da1ee14c119cb.tar.gz
bcm5719-llvm-ab768a85f686d8334d9c96752e5da1ee14c119cb.zip
Fix debug mode build w/o exceptions
llvm-svn: 290652
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/__debug3
-rw-r--r--libcxx/lib/abi/CHANGELOG.TXT2
-rw-r--r--libcxx/src/debug.cpp4
3 files changed, 8 insertions, 1 deletions
diff --git a/libcxx/include/__debug b/libcxx/include/__debug
index e3a5ec965b4..e0cef09ee0a 100644
--- a/libcxx/include/__debug
+++ b/libcxx/include/__debug
@@ -82,6 +82,9 @@ bool __libcpp_set_debug_function(__libcpp_debug_function_type __func);
// Setup the throwing debug handler during dynamic initialization.
#if _LIBCPP_DEBUG_LEVEL >= 1 && defined(_LIBCPP_DEBUG_USE_EXCEPTIONS)
+# if defined(_LIBCPP_NO_EXCEPTIONS)
+# error _LIBCPP_DEBUG_USE_EXCEPTIONS cannot be used when exceptions are disabled.
+# endif
static bool __init_dummy = __libcpp_set_debug_function(__libcpp_throw_debug_function);
#endif
diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT
index bccca2e085e..15703feb638 100644
--- a/libcxx/lib/abi/CHANGELOG.TXT
+++ b/libcxx/lib/abi/CHANGELOG.TXT
@@ -16,7 +16,7 @@ New entries should be added directly below the "Version" header.
Version 4.0
-----------
-* rTBD - Add _LIBCPP_ASSERT debug handling functions
+* r290651 - Add _LIBCPP_ASSERT debug handling functions
All Platforms
-------------
diff --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp
index fe27dc82ca6..f2fc1ceb495 100644
--- a/libcxx/src/debug.cpp
+++ b/libcxx/src/debug.cpp
@@ -41,7 +41,11 @@ _LIBCPP_NORETURN void __libcpp_abort_debug_function(__libcpp_debug_info const& i
}
_LIBCPP_NORETURN void __libcpp_throw_debug_function(__libcpp_debug_info const& info) {
+#ifndef _LIBCPP_NO_EXCEPTIONS
throw __libcpp_debug_exception(info);
+#else
+ __libcpp_abort_debug_function(info);
+#endif
}
struct __libcpp_debug_exception::__libcpp_debug_exception_imp {
OpenPOWER on IntegriCloud