diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-28 04:58:52 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-28 04:58:52 +0000 |
commit | 01eb99ac7bb111520d011748fb9fff176d2e64d7 (patch) | |
tree | ddacda4800b22c6a0f9266bc5d6290ff45badf6f /www | |
parent | 046a71be67e5c65c3425a85416edf852fc7d1887 (diff) | |
download | external_libcxx-01eb99ac7bb111520d011748fb9fff176d2e64d7.tar.gz external_libcxx-01eb99ac7bb111520d011748fb9fff176d2e64d7.tar.bz2 external_libcxx-01eb99ac7bb111520d011748fb9fff176d2e64d7.zip |
Implement a throwing version of _LIBCPP_ASSERT.
This patch implements changes to allow _LIBCPP_ASSERT to throw on failure
instead of aborting. The main changes needed to do this are:
1. Change _LIBCPP_ASSERT to call a handler via a replacable function pointer
instead of calling abort directly. Additionally this patch implements two
handler functions, one which aborts and another that throws an exception.
2. Add _NOEXCEPT_DEBUG macro for disabling noexcept spec on function which
contain _LIBCPP_ASSERT. This is required in order to prevent assertion
failures throwing through a noexcept function. This macro has no effect
unless _LIBCPP_DEBUG_USE_EXCEPTIONS is defined.
Having a non-aborting _LIBCPP_ASSERT is very important to allow sane testing of
debug mode. Currently we can only have one test case per file, since the test
case will cause the program to abort. Testing debug mode this way would require
thousands of test files, most of which would be 95% boiler plate. I don't think
this is a feasible strategy. Fortunately using a throwing debug handler solves
these issues.
Additionally this patch rewrites the documentation for debug mode.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www')
-rw-r--r-- | www/debug_mode.html | 162 | ||||
-rw-r--r-- | www/index.html | 1 |
2 files changed, 0 insertions, 163 deletions
diff --git a/www/debug_mode.html b/www/debug_mode.html deleted file mode 100644 index 943c47db0..000000000 --- a/www/debug_mode.html +++ /dev/null @@ -1,162 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" - "http://www.w3.org/TR/html4/strict.dtd"> -<html> -<head> - <title>libc++ debug mode status</title> -</head> -<body> - -<p> -Work is beginning on a libc++ debug mode. The purpose of this table is to -record which parts of libc++ have debug mode support. -</p> - -<p> -Note: Debug mode is currently not functional. Defining _LIBCPP_DEBUG will result -in fairly nasty compile errors. -</p> - -<table border=1> -<tr> -<th>Section</th> -<th>Completed ?</th> -</tr> - -<tr> -<td> -<p> -<code>vector<T>, T != bool</code> -</p> -</td> -<td align="center"> ✓ </td> -</tr> - -<tr> -<td> -<p> -<code><list></code> -</p> -</td> -<td align="center"> ✓ </td> -</tr> - -<tr> -<td> -<p> -<code><unordered_set></code> -</p> -</td> -<td align="center"> ✓ </td> -</tr> - -<tr> -<td> -<p> -<code><unordered_map></code> -</p> -</td> -<td align="center"> ✓ </td> -</tr> - -<tr> -<td> -<p> -<code><string></code> -</p> -</td> -<td align="center"> ✓ </td> -</tr> - -<tr> -<td> -<p> -<code><set></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><map></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code>vector<bool></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><deque></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><forward_list></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><array></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><stack></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><queue></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - -<tr> -<td> -<p> -<code><algorithm></code> -</p> -</td> -<td align="center"><!-- ✓ --></td> -</tr> - - -</table> - -<p> -At present the table is known to not be a complete list. It is currently ordered -in approximate priority order. -</p> - -<p>Last Updated: 3-June-2014</p> - -</body> -</html> diff --git a/www/index.html b/www/index.html index e0f02f2de..6b464ebec 100644 --- a/www/index.html +++ b/www/index.html @@ -220,7 +220,6 @@ <li><a href="atomic_design.html"><tt><atomic></tt></a></li> <li><a href="type_traits_design.html"><tt><type_traits></tt></a></li> <li><a href="http://cplusplusmusings.wordpress.com/2012/07/05/clang-and-standard-libraries-on-mac-os-x/">Excellent notes by Marshall Clow</a></li> -<li><a href="debug_mode.html">Status of debug mode</a></li> </ul> </div> |