summaryrefslogtreecommitdiffstats
path: root/libcxx/include/stdexcept
Commit message (Collapse)AuthorAgeFilesLines
* Fix ABI compatibility of `<stdexcept>` with VCRuntime.Eric Fiselier2019-03-061-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, libc++'s `<stdexcept>` doesn't play nice with `vcruntime`. Specifically: * `logic_error` and `runtime_error` have a different layout. * libc++'s `logic_error` and `runtime_error` override `what()` but `vcruntime` does not. * `vcruntime` uses weak vtables for `<stdexcept>` types. * libc++'s `<stdexcept>` constructors and assignment operators may have different manglings than `vcruntimes`. This patch makes libc++'s declarations in `<stdexcept>` match those provided by MSVC's STL as closely as possible. If MSVC doesn't declare a special member, then neither do we. This ensures that the implicit definitions have the same linkage, visibility, triviality, and noexcept-ness. Reviewers: thomasanderson, ldionne, smeenai Reviewed By: thomasanderson Subscribers: jdoerfert, libcxx-commits Differential Revision: https://reviews.llvm.org/D58945 llvm-svn: 355546
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [NFC][libc++] Consistently use spaces to indentLouis Dionne2018-08-031-6/+6
| | | | | | rdar://problem/19988944 llvm-svn: 338933
* [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by ↵Louis Dionne2018-07-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | _LIBCPP_INLINE_VISIBILITY Summary: We never actually mean to always inline a function -- all the uses of the macro I could find are actually attempts to control the visibility of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which is actually always defined the same. This change is orthogonal to the decision of what we're actually going to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by having one canonical way of doing things. Note that this commit had originally been applied in r336369 and then reverted in r336382 because of unforeseen problems. Both of these problems have now been fixed. Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, erikvanderpoel Differential Revision: https://reviews.llvm.org/D48892 llvm-svn: 336866
* Revert "[libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by ↵Louis Dionne2018-07-051-8/+8
| | | | | | | | | | | | | | | _LIBCPP_INLINE_VISIBILITY" This reverts commit r336369. The commit had two problems: 1. __pbump was marked as _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY instead of _LIBCPP_INLINE_VISIBILITY, which lead to two symbols being added in the dylib and the check-cxx-abilist failing. 2. The LLDB tests started failing because they undefine `_LIBCPP_INLINE_VISIBILITY`. I need to figure out why they do that and fix the tests before we can go forward with this change. llvm-svn: 336382
* [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITYLouis Dionne2018-07-051-8/+8
| | | | | | | | | | | | | | | | | | | | Summary: We never actually mean to always inline a function -- all the uses of the macro I could find are actually attempts to control the visibility of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which is actually always defined the same. This change is orthogonal to the decision of what we're actually going to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by having one canonical way of doing things. Reviewers: EricWF Subscribers: christof, llvm-commits, dexonsmith, erikvanderpoel, mclow.lists Differential Revision: https://reviews.llvm.org/D48892 llvm-svn: 336369
* Fix more unreserved namesEric Fiselier2017-06-011-3/+3
| | | | llvm-svn: 304383
* Fix unused parameters and variablesEric Fiselier2016-12-231-8/+16
| | | | llvm-svn: 290459
* [libc++] Fix modules build - Rework __refstring definition Eric Fiselier2016-10-251-8/+14
| | | | | | | | | | | | | | | Summary: `__libcpp_refstring` currently has two different definitions. First there is the complete definition in `<__refstring>` but there is also a second in `<stdexcept>`. The historical reason for this split is because both libc++ and libc++abi need to see the inline definitions of __libcpp_refstrings methods, but the `<stdexcept>` header doesn't. However this is an ODR violation and breaks the modules build. This patch fixes the issue by creating a single class definition in `<stdexcept>` and changing `<__refstring>` to contain only the inline method definitions. This way both `libcxx/src/stdexcept.cpp` and `libcxxabi/src/stdexcept.cpp` see the same declaration in `<stdexcept>` and definitions in `<__refstring>` Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25603 llvm-svn: 285100
* Try 2 - Remove <cstdlib> include from `<exception>`Eric Fiselier2016-09-061-0/+3
| | | | | | | | | | | This patch removes the `<cstdlib>` include from exception where it is no longer needed. Unlike my previous attempt this patch also adds <cstdlib> where needed in other headers like <new> and <typeinfo>. This won't fix the Firefox build issues discussed on IRC but it is more correct for libc++. llvm-svn: 280754
* Add an _LIBCPP_NORETURN inline function named __throw_XXX for each exception ↵Marshall Clow2016-08-251-0/+87
| | | | | | type we define. They either construct and throw the exception, or abort() (if exceptions are disabled). Use these functions everywhere instead of assert()ing when exceptions are disabled. WARNING: This is a behavior change - but only with exceptions disabled. Reviewed as: https://reviews.llvm.org/D23855. llvm-svn: 279744
* Fix most GCC attribute ignored warningsEric Fiselier2016-04-211-1/+5
| | | | llvm-svn: 267074
* Fix unused private field warning in stdexcept after r207695.Dimitry Andric2015-02-051-1/+1
| | | | | | | | | | | | | | Add a new _LIBCPP_UNUSED define in __config, which can be used to indicate explicitly unused items, and apply it to the __imp__ field of __libcpp_refstring. Somebody who knows about Microsoft C++ and IBM C++ should fill in the unused attribute syntax appropriate for those compilers, if there is any. Differential Revision: http://reviews.llvm.org/D6836 llvm-svn: 228281
* Exceptions store the message as reference counted string forJoerg Sonnenberger2014-04-301-2/+10
| | | | | | | | | compatibility to libstdc++. Move the implementation into a header for easier sharing with libc++abi. Merge a number of improvements from that version. Provide a POD definition for <stdexcept>'s public use to avoid cast dances. Discussed with Marshall Clow. llvm-svn: 207695
* Windows support by Ruben Van Boxem.Howard Hinnant2011-10-171-0/+2
| | | | llvm-svn: 142235
* Applied noexcept to everything in [diagnostics] (Chapter 19)Howard Hinnant2011-05-261-17/+17
| | | | llvm-svn: 132137
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Fixing whitespace problemsHoward Hinnant2010-08-221-1/+0
| | | | llvm-svn: 111750
* Wiped out some non-ascii characters that snuck into the copyright.Howard Hinnant2010-05-111-1/+1
| | | | llvm-svn: 103516
* libcxx initial importHoward Hinnant2010-05-111-0/+161
llvm-svn: 103490
OpenPOWER on IntegriCloud