summaryrefslogtreecommitdiffstats
path: root/libcxx/src/exception.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mark libc++ internal globals with _LIBCPP_SAFE_STATIC.Eric Fiselier2016-09-281-2/+2
| | | | | | | | | | | | | This patch applies the _LIBCPP_SAFE_STATIC attribute to internal globals, most of which are locking primitives, in order to ensure that they can safely be used during program startup. This patch also fixes an unsafe static init issue with the global locks used to implement atomic operations on shared pointers. Previously the locks were initialized using a dynamically initialized pointer, so it was possible that the pointer was uninitialized. llvm-svn: 282640
* Remove a long-standing __has_include hack.Benjamin Kramer2015-10-161-7/+3
| | | | | | | | | This was put in to get libc++ building without libcxxabi. We now have macros that show that we are building against libcxxabi so use that instead. This guards against existing but broken cxxabi.h headers on the system. llvm-svn: 250507
* Move uncaught_exeption() definition inside the #ifdef block like ↵Marshall Clow2015-06-021-1/+1
| | | | | | uncaught_exceptions() llvm-svn: 238879
* Implement uncaught_exceptions() using the newly added hooks in libc++abi, ↵Marshall Clow2015-06-021-5/+11
| | | | | | when available llvm-svn: 238846
* Fix building and testing libc++ with GCC.Eric Fiselier2015-05-201-1/+1
| | | | | | | | | | | | | | | | The changes in src/exception.cpp and cmake/Modules/HandleLibCXXABI.cmake fix a bug when building libc++ with GCC. Because GCC does not support __has_include we need to explicitly tell it that we are building against libc++abi via the preprocessor definition `LIBCXX_BUILDING_LIBCXXABI`. The changes in include/ratio are to work around CWG defect 1712 (constexpr variable template declarations). GCC 4.8 and before has not adopted the resolution to this defect. The changes in include/exception work around an issue where is_final is used without it being defined in type_traits. llvm-svn: 237767
* Print log/error messages on stderr, not stdoutEd Schouten2015-03-101-8/+8
| | | | | | | | | | | | There are a couple of places where libc++ prints log/error messages to stdout on its own. This may of course interfere with the output generated with applications. Log/error messages should be directed to stderr instead. Differential Revision: http://reviews.llvm.org/D8135 Reviewed by: marshall llvm-svn: 231767
* Partial fix for building w/ libcxxrt on OSX. Patch from C Bergstrom.Eric Fiselier2014-11-011-1/+1
| | | | llvm-svn: 221029
* Patch by Bruce Mitchener. Change all references to EMSCRIPTEN to ↵Marshall Clow2013-11-191-3/+3
| | | | | | __EMSCRIPTEN__. If you're not using the PP symbol EMSCRIPTEN, then you should see no functionality change. llvm-svn: 195136
* Patch from Bruce Mitchener; fixes two typos in comments. No functionality ↵Marshall Clow2013-11-111-1/+1
| | | | | | change. PR17843 llvm-svn: 194432
* Silence the unused function warning in exception.cpp.Peter Collingbourne2013-10-061-17/+16
| | | | | | | Rather than try to protect the function behind a precise, ever-changing #if expression, just inline it into every caller. llvm-svn: 192077
* Implement std::exception_ptr under libsupc++.Peter Collingbourne2013-10-061-12/+51
| | | | | | | | | | | | | | | | | libsupc++ does not implement the dependent EH ABI and the functionality it uses to implement std::exception_ptr (which it declares as an alias of std::__exception_ptr::exception_ptr) is not directly exported to clients. So we have little choice but to hijack std::__exception_ptr::exception_ptr's (which fortunately has the same layout as our std::exception_ptr) copy constructor, assignment operator and destructor (which are part of its stable ABI), and its rethrow_exception(std::__exception_ptr::exception_ptr) function. Also, remove some out of date comments. Differential Revision: http://llvm-reviews.chandlerc.com/D1826 llvm-svn: 192076
* Eliminate more symbols multiply defined between libsupc++ and libc++.Peter Collingbourne2013-10-061-0/+4
| | | | | | | | | | | | | | | The remaining multiple definitions were flushed out by attempting to link libsupc++ and libc++ into the same executable with --whole-archive, e.g. clang++ -I../llvm/projects/libcxx/include -nodefaultlibs -Wl,--whole-archive lib/libc++.a /usr/lib/gcc/x86_64-linux-gnu/4.6/libsupc++.a -Wl,--no-whole-archive -lgcc -lgcc_s -lc -lpthread -lrt (The same technique was used to flush out multiple definitions in libstdc++.) Differential Revision: http://llvm-reviews.chandlerc.com/D1824 llvm-svn: 192074
* G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since ↵Howard Hinnant2013-10-041-22/+52
| | | | | | that compiler doesn't support #warning. llvm-svn: 191980
* Add some friendly messages to libcxx calls to abort().Howard Hinnant2013-07-231-0/+9
| | | | llvm-svn: 186951
* Bruce Mitchener, Jr.: Port to emscripten. Fixes ↵Howard Hinnant2013-03-291-1/+3
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15624. llvm-svn: 178354
* Removed raw references to __APPLE__; now just check to see if it is defined.Marshall Clow2013-03-181-2/+2
| | | | llvm-svn: 177297
* Saleem Abdulrasool: __terminate_handler and __unexpected_handler are defined ↵Howard Hinnant2013-01-221-1/+1
| | | | | | | | | but not used when building against libsupc++ as the functions for which they are used are provided by libsupc++. Simply preprocess them away when building against libsupc++. llvm-svn: 173165
* [CMake] Add support for selecting which c++ abi library to use.Michael J. Spencer2012-11-301-3/+3
| | | | llvm-svn: 169036
* libc++: switch from using _ATTRIBUTE(noreturn) (which conflicts with aRichard Smith2012-07-261-4/+4
| | | | | | platform-provided macro on some systems) to _LIBCPP_NORETURN. llvm-svn: 160773
* Teach libc++ to check for libc++abi and use its features if they're available.Richard Smith2012-07-111-8/+11
| | | | llvm-svn: 160038
* Undo some overzealous #ifdefs for LIBCXXRT.David Chisnall2012-03-141-5/+9
| | | | llvm-svn: 152718
* I'm reverting one of the changes made to exception.cpp in r151717. I'm ↵Howard Hinnant2012-02-291-0/+4
| | | | | | unsure what the change was trying to do, but it didn't do the right thing for __APPLE__. So instead of trying to guess what was intended, I'm just putting it back the way it was. llvm-svn: 151727
* Some libcxxrt-compatibility cleanups (avoid defining things twice).David Chisnall2012-02-291-27/+25
| | | | llvm-svn: 151717
* Make attributes on definition consistent with those on declaration.Howard Hinnant2012-02-031-0/+1
| | | | llvm-svn: 149701
* Prepare for running on top of new libc++abi.Howard Hinnant2012-02-021-9/+17
| | | | llvm-svn: 149634
* Correct change to exception.cpp from r140245Howard Hinnant2011-09-211-1/+1
| | | | llvm-svn: 140253
* Fixes for FreeBSD, including some fairly obvious copy-and-paste errors.David Chisnall2011-09-211-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libc++ now mostly works on FreeBSD with libcxxrt and this patch applied to the base system: http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110920/e666632c/xlocale-0001.obj Summary of tests on FreeBSD: **************************************************** Results for /root/libcxx/test: using FreeBSD clang version 3.0 (trunk 135360) 20110717 Target: x86_64-unknown-freebsd9.0 Thread model: posix with -std=c++0x -stdlib=libc++ -I/root/libcxx/include -L/root/libcxx/build/lib ---------------------------------------------------- sections without tests : 1 sections with failures : 48 sections without failures: 1015 + ---- total number of sections : 1064 ---------------------------------------------------- number of tests failed : 145 number of tests passed : 4179 + ---- total number of tests : 4324 **************************************************** (Many due to this clang version not supporting C++ atomics) More fixes to follow... llvm-svn: 140245
* Configure to get along with 2.9 clangHoward Hinnant2011-07-291-0/+1
| | | | llvm-svn: 136526
* Applied noexcept to everything in [language.support] (Chapter 18)Howard Hinnant2011-05-261-15/+15
| | | | llvm-svn: 132129
* Added [[noreturn]] attribute everywhere it should beHoward Hinnant2011-05-261-2/+4
| | | | llvm-svn: 132125
* Add a couple more std-qualifers.Howard Hinnant2010-12-061-2/+2
| | | | llvm-svn: 121002
* Fix up uses of new/terminate/unexpected handlers to use the new getters.Howard Hinnant2010-12-041-2/+2
| | | | llvm-svn: 120914
* N3189 Observers for the three handler functionsHoward Hinnant2010-12-021-6/+14
| | | | llvm-svn: 120712
* license changeHoward Hinnant2010-11-161-2/+2
| | | | llvm-svn: 119395
* Remove tabsHoward Hinnant2010-08-221-21/+21
| | | | llvm-svn: 111778
* Fixing whitespace problemsHoward Hinnant2010-08-221-35/+25
| | | | llvm-svn: 111751
* now works with -fno-exceptions and -fno-rttiHoward Hinnant2010-08-111-2/+8
| | | | llvm-svn: 110828
* [except.nested]Howard Hinnant2010-05-271-0/+17
| | | | llvm-svn: 104850
* patch by Jeffrey Yasskin for porting to Ubuntu Hardy. Everything was ↵Howard Hinnant2010-05-241-3/+5
| | | | | | accepted except there were some bug fixes needed in <locale> for the __nolocale_* series. For the apple branch I ended up using templates instead of the var_args solution because it seemed both safer and more efficient. llvm-svn: 104516
* add headers and implementation for <new>, <exception>, and <typeinfo>Nick Kledzik2010-05-141-0/+171
llvm-svn: 103795
OpenPOWER on IntegriCloud